ci: Rework docker #65
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
# ref: https://github.com/actions/runner-images | |
name: amd64 Linux .Net | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
# Building using the github runner environement directly. | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build: [ | |
["Unix Makefiles", "Release"], | |
["Ninja", "Release"], | |
["Ninja Multi-Config", "Release"] | |
] | |
fail-fast: false | |
env: | |
GENERATOR: ${{ matrix.build[0] }} | |
BUILD_TYPE: ${{ matrix.build[1] }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Ninja | |
run: | | |
sudo apt-get update | |
sudo apt-get install ninja-build | |
- name: Uninstall preinstalled swig3.0 | |
run: | | |
swig -version; | |
sudo apt remove -y swig swig3.0 | |
- name: Install SWIG 4.0.2 | |
run: | | |
wget "https://downloads.sourceforge.net/project/swig/swig/swig-4.0.2/swig-4.0.2.tar.gz"; | |
tar xvf swig-4.0.2.tar.gz; | |
rm swig-4.0.2.tar.gz; | |
cd swig-4.0.2; | |
./configure --prefix=/usr; | |
make -j8; | |
sudo make install; | |
cd ..; | |
rm -rf swig-4.0.2; | |
- name: Check swig | |
run: swig -version | |
# Install .NET SDKs | |
- name: Setup .NET Core 3.1 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 3.1.x | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Check dotnet | |
run: dotnet --info | |
- name: Check cmake | |
run: cmake --version | |
- name: Configure | |
run: cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=install -DBUILD_DOTNET=ON | |
- name: Build | |
run: cmake --build build --config "$BUILD_TYPE" --target all -v | |
- name: Test | |
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target test -v | |
- name: Install | |
run: cmake --build build --config "$BUILD_TYPE" --target install -v |