-
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
50 additions
and
84 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,62 @@ | ||
# 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: | ||
fail-fast: false | ||
matrix: | ||
target: [Linux, Windows, OSX] | ||
build_type: [Debug, Release] | ||
include: | ||
- target: Linux | ||
host: ubuntu-latest | ||
- target: Windows | ||
host: windows-latest | ||
- target: OSX | ||
host: macos-latest | ||
steps: | ||
- name: Check out main third party without submodules | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Set clang as the default compiler | ||
if: ${{ matrix.host == 'ubuntu-latest' }} | ||
run: | | ||
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 Linux dependencies | ||
if: ${{ matrix.host == 'ubuntu-latest'}} | ||
run: | | ||
git clone -j 8 https://github.com/$GITHUB_REPOSITORY | ||
cd thirdparty | ||
git checkout $GITHUB_SHA | ||
shell: bash | ||
working-directory: ${{github.workspace}} | ||
sudo apt install ccache -y | ||
sudo apt install ninja-build -y | ||
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV | ||
- name: Install gh cli extension actions-cache | ||
- name: Install Windows dependencies | ||
if: ${{ matrix.host == 'windows-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 | ||
choco install ccache -A | ||
- name: Install Darwin dependencies | ||
if: ${{ matrix.host == 'macos-latest'}} | ||
run: | | ||
cd thirdparty | ||
time git submodule update --init --recursive --jobs 8 | ||
brew install ccache | ||
- name: Install bindgen | ||
run: cargo install cbindgen | ||
|
||
- name: Add Rust target | ||
run: rustup target add wasm32-unknown-emscripten | ||
|
||
shell: bash | ||
working-directory: ${{github.workspace}} | ||
- name: Configure CMake | ||
run: cmake -S build/${{matrix.target}} -B build/${{matrix.target}}/${{matrix.build_type}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} | ||
|
||
- name: Build project | ||
run: cmake --build build/${{matrix.target}}/${{matrix.build_type}} --config ${{matrix.build_type}} |
This file was deleted.
Oops, something went wrong.