-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added barebones matrix build action for testing purposes
- Loading branch information
Showing
2 changed files
with
44 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,55 @@ | ||
# This is a workflow to cache the sources for all the builds | ||
name: Build per OS | ||
|
||
name: Testing Build Matrix of Libraries | ||
|
||
# Controls when the workflow will run | ||
# Triggers the workflow on push or pull request events and manually from the Actions tab | ||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
MAKEFLAGS: "-j 8" | ||
CMAKE_BUILD_PARALLEL_LEVEL: 8 | ||
|
||
jobs: | ||
test-matrix-build: | ||
runs-on: ubuntu-latest | ||
# outputs: | ||
# matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
# CACHE_NAME_SHAS: ${{ steps.set-matrix.outputs.CACHE_NAME_SHAS }} | ||
# HAS_MATRIX_VALUES: ${{ steps.set-matrix.outputs.HAS_MATRIX_VALUES }} | ||
build: | ||
runs-on: ${{matrix.host}} | ||
strategy: | ||
matrix: | ||
target: [Linux, Windows] | ||
build_type: [Debug, Release] | ||
include: | ||
- target: Linux | ||
host: ubuntu-latest | ||
- target: Windows | ||
host: windows-latest | ||
|
||
steps: | ||
- name: Check out main third party without submodules | ||
run: | | ||
git clone -j 8 https://github.com/$GITHUB_REPOSITORY | ||
cd thirdparty | ||
git checkout $GITHUB_SHA | ||
shell: bash | ||
working-directory: ${{github.workspace}} | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Install gh cli extension actions-cache | ||
- name: Set clang as the default compiler | ||
if: ${{ matrix.host == 'ubuntu-latest' }} | ||
run: | | ||
type -p gh >/dev/null || { | ||
type -p curl >/dev/null || sudo apt install curl -y | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg | ||
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null | ||
sudo apt update | ||
sudo apt install gh -y | ||
} | ||
gh extension install actions/gh-actions-cache | ||
echo "REPO=${{ github.repository }}" >> $GITHUB_ENV | ||
echo "BRANCH=${{ github.ref }}" >> $GITHUB_ENV | ||
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | ||
- name: Check out submodules | ||
sudo update-alternatives --install /usr/bin/cc cc $(which clang) 100 | ||
sudo update-alternatives --install /usr/bin/c++ c++ $(which clang++) 100 | ||
sudo update-alternatives --set cc $(which clang) | ||
sudo update-alternatives --set c++ $(which clang++) | ||
- name: Install bindgen | ||
run: cargo install cbindgen | ||
|
||
- name: Add Rust target | ||
run: rustup target add wasm32-unknown-emscripten | ||
|
||
- name: Configure CMake | ||
run: cmake -S build/${{matrix.target}} -B build/${{matrix.target}}/${{matrix.build_type}} | ||
|
||
- name: Install Linux dependencies | ||
if: ${{ matrix.host == 'ubuntu-latest'}} | ||
run: | | ||
cd thirdparty | ||
time git submodule update --init --recursive --jobs 8 | ||
sudo apt install ccache -y | ||
sudo apt install ninja-build -y | ||
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV | ||
shell: bash | ||
working-directory: ${{github.workspace}} | ||
- name: Install Windows dependencies | ||
if: ${{ matrix.host == 'windows-latest'}} | ||
run: | | ||
choco install ccache -A | ||
- name: Build project | ||
run: cmake --build build/${{matrix.target}}/${{matrix.build_type}} --config ${{matrix.build_type}} -j |
This file was deleted.
Oops, something went wrong.