fix ci 12 #94
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
name: Demo on windows, linux and macos | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
build_type: [Release] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install ninja-build, bazelisk and local dependencies (Ubuntu) | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get install ninja-build -y | |
python3 -m pip install -r requirements.txt | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash | |
bash -i -c "nvm install --lts" | |
bash -i -c "sudo npm install -g @bazel/bazelisk" | |
- name: Install ninja-build, bazel and local dependencies (macos) | |
if: contains(matrix.os, 'macos') | |
run: | | |
brew install ninja | |
brew install bazelisk | |
python3 -m pip install -r requirements.txt --break-system-packages | |
- name: Install bazel and local dependencies (windows) | |
if: contains(matrix.os, 'windows') | |
run: | | |
choco install bazel | |
python3 -m pip install -r requirements.txt | |
- name: Install cmake with pipx (All) | |
run: | | |
pipx install cmake | |
- name: demo-project1 (cmake) | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project1 | |
- name: demo-project1 (bazel) | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project1 --bazel | |
- name: demo-project2 (cmake) | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project2 | |
- name: demo-project2 (bazel) | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project2 --bazel | |
- name: demo-project2 (windows cmd) | |
if: contains(matrix.os, 'windows') | |
shell: cmd | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project2 | |
- name: demo-project2 (windows cmd) (bazel) | |
if: contains(matrix.os, 'windows') | |
shell: cmd | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project2 --bazel | |
- name: demo-project3 (cmake) | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project3 | |
- name: demo-project3 (bazel) | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project3 --bazel | |
- name: demo-project4 C++20 (macos only, until github CI linux/win compilers support c++20) | |
if: contains(matrix.os, 'macos') | |
shell: bash | |
run: | | |
python3 cxxbuild/cxxbuild.py demo/project4 --c++20 | |
python3 cxxbuild/cxxbuild.py demo/project4 --c++20 --bazel | |
- name: demo-project5 (all github compilers broken for c++20) | |
shell: bash | |
run: | | |
echo "no test" | |