Skip to content

Commit

Permalink
CI: added some "basic" GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 16, 2024
1 parent 54cbefe commit 9bed635
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,48 @@ jobs:
fail-fast: false
matrix:
include:
- name: 'Windows static (B&T)'
- name: 'Windows static (BPT)'
os: windows-latest
bindings_python: ON
build_shared: OFF
unit_tests: ON
set_path: $env:Path="C:\libxml2\bin;C:\zlib\bin;"+$env:Path
additional_cmake_options: -DLIBXML2_INCLUDE_DIR="C:\libxml2\include\libxml2" -DLIBXML2_LIBRARY="C:\libxml2\lib\libxml2.lib" -DZLIB_INCLUDE_DIR="C:\zlib\include" -DZLIB_LIBRARY="C:\zlib\lib\z_dll.lib"
- name: 'Windows shared (B&T)'
- name: 'Windows shared (BPT)'
os: windows-latest
bindings_python: ON
build_shared: ON
unit_tests: ON
set_path: $env:Path="C:\libxml2\bin;C:\zlib\bin;"+$env:Path
additional_cmake_options: -DLIBXML2_INCLUDE_DIR="C:\libxml2\include\libxml2" -DLIBXML2_LIBRARY="C:\libxml2\lib\libxml2.lib" -DZLIB_INCLUDE_DIR="C:\zlib\include" -DZLIB_LIBRARY="C:\zlib\lib\z_dll.lib"
- name: 'Linux static (B)'
os: ubuntu-latest
bindings_python: OFF
build_shared: OFF
unit_tests: OFF
- name: 'Linux shared (B&T)'
- name: 'Linux shared (BPT)'
os: ubuntu-latest
bindings_python: ON
build_shared: ON
unit_tests: ON
- name: 'macOS static (Intel) (B&T)'
- name: 'macOS static (Intel) (BT)'
os: macos-13
bindings_python: OFF
build_shared: OFF
unit_tests: ON
- name: 'macOS shared (Intel) (B&T)'
- name: 'macOS shared (Intel) (BPT)'
os: macos-13
bindings_python: ON
build_shared: ON
unit_tests: ON
- name: 'macOS static (ARM) (B&T)'
- name: 'macOS static (ARM) (BT)'
os: macos-latest
bindings_python: OFF
build_shared: OFF
unit_tests: ON
- name: 'macOS shared (ARM) (B&T)'
- name: 'macOS shared (ARM) (BPT)'
os: macos-latest
bindings_python: ON
build_shared: ON
unit_tests: ON
env:
Expand All @@ -59,6 +67,11 @@ jobs:
steps:
- name: Check out libCellML
uses: actions/checkout@v4
- name: Install Python (if needed)
if: ${{ matrix.bindings_python == 'ON' }}
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install buildcache
Expand All @@ -73,6 +86,10 @@ jobs:
run: |
Invoke-WebRequest -UseBasicParsing https://github.com/cellml/gha/releases/download/gha/libxml2.zip -OutFile libxml2.zip
Expand-Archive -LiteralPath libxml2.zip -DestinationPath C:\
- name: Install SWIG (macOS only)
if: ${{ runner.os == 'macOS' }} && ${{ matrix.bindings_python == 'ON' }}
run: |
brew install swig
- name: Install zlib (Windows only)
if: ${{ runner.os == 'Windows' }}
run: |
Expand All @@ -83,11 +100,16 @@ jobs:
mkdir build
cd build
${{ matrix.set_path }}
cmake -G Ninja -DBINDINGS_PYTHON=OFF -DBUILD_SHARED=${{ matrix.build_shared }} -DCOVERAGE=OFF -DLLVM_COVERAGE=OFF -DMEMCHECK=OFF -DUNIT_TESTS=${{ matrix.unit_tests }} ${{ matrix.additional_cmake_options }} ..
cmake -G Ninja -DBINDINGS_PYTHON=${{ matrix.bindings_python }} -DBUILD_SHARED=${{ matrix.build_shared }} -DCOVERAGE=OFF -DLLVM_COVERAGE=OFF -DMEMCHECK=OFF -DUNIT_TESTS=${{ matrix.unit_tests }} ${{ matrix.additional_cmake_options }} ..
- name: Build libCellML
run: |
cd build
ninja
- name: Run python_test_annotator (macOS only)
if: ${{ runner.os == 'macOS' }}
run: |
cd build
ctest -V -R python_test_annotator
- name: Unit testing
if: ${{ matrix.unit_tests == 'ON' }}
run: |
Expand Down

0 comments on commit 9bed635

Please sign in to comment.