Merge pull request #55 from thewtex/version-bumps #1
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-12, macos-14, windows-2022] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install ninja | |
shell: bash | |
run: | | |
if [[ "${{ runner.os }}" == "macOS" ]]; then | |
brew install ninja | |
elif [[ "${{ runner.os }}" == "Linux" ]]; then | |
sudo apt-get -y update | |
sudo apt-get -y install ninja-build | |
fi | |
- name: Build | |
if: matrix.os != 'windows-2022' | |
run: | | |
cmake -Bbuild -S. -GNinja | |
ninja -Cbuild | |
- name: Build | |
if: matrix.os == 'windows-2022' | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
cmake -Bbuild -S. -GNinja | |
ninja -Cbuild | |
- name: Test | |
run: | | |
cd build/castxml-prefix/src/castxml-build | |
ctest --output-on-failure | |
- name: Archive | |
shell: cmd | |
run: | | |
cd build | |
if [[ "${{ runner.os }}" == "Windows" ]]; then | |
7z a castxml-windows.zip castxml | |
mv castxml-windows.zip .. | |
else | |
tar cvf castxml-${{ matrix.os }}.tar castxml | |
gzip -9 castxml-${{ matrix.os }}.tar | |
mv castxml-${{ matrix.os }}.tar.gz .. | |
fi | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-archive | |
path: ./castxml-${{ matrix.os }}.* |