Skip to content

mac os build

mac os build #327

Workflow file for this run

name: dotnet package
on:
pull_request:
paths-ignore:
- '**.md'
jobs:
run:
name: Run
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
dotnet-version: [ '3.1.x', '6.0.x' ]
operating-system: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt update && sudo apt install -y build-essential ninja-build python3-pip python3-dev curl gnupg apt-transport-https
- name: conan installation and configuration
run: |
pip install conan==1.64.0 pytest==6.2.5
conan user
conan profile new default --detect --force
conan profile update settings.compiler.libcxx=libstdc++11 default
conan config set general.parallel_download=$(nproc)
conan config set general.cpu_count=$(nproc)
conan remote add duckstax http://conan.duckstax.com
- name: download dependencies
run: |
mkdir build && cd build
cp ../conanfile.txt .
conan install . --build missing -s build_type=Release
- name: build
env:
CC: gcc
run: |
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DDEV_MODE=ON ..
cmake --build .
- name: Test
run: |
cd build
ctest -C -V --output-on-failure
- name: PyTest
run: |
cd build/integration/python/
pytest
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Test with dotnet
run: |
mkdir -p integration/csharp/src/Duckstax.Otterbrix/bin/Release/net7.0
mkdir -p integration/csharp/tests/Duckstax.Otterbrix.Tests/bin/Release/net7.0
cp ./build/integration/c/libotterbrix.so ./integration/csharp/src/Duckstax.Otterbrix/bin/Release/net7.0/libotterbrix.so
cp ./build/integration/c/libotterbrix.so ./integration/csharp/tests/Duckstax.Otterbrix.Tests/bin/Release/net7.0/libotterbrix.so
cd integration/csharp/
dotnet test ./tests/Duckstax.Otterbrix.Tests/Duckstax.Otterbrix.Tests.csproj --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" -c Release
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}