efe #197
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 Workflow | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/panduza/pzacxx-build-img:latest | |
options: --user 1001 | |
strategy: | |
matrix: | |
os: [linux] | |
compiler: [gcc] | |
build_type: [Debug] | |
shared: ["True", "False"] | |
exclude: | |
- os: linux | |
compiler: mingw | |
- os: win | |
compiler: gcc | |
- os: win | |
compiler: clang | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- if: ${{ env.ACT }} | |
name: Hack container for local development | |
run: pacman -S --noconfirm nodejs | |
- name: "cache" | |
uses: actions/cache@v2 | |
with: | |
path: ~/.conan2/p | |
key: conan-cache-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ matrix.shared }} | |
- name: "Install" | |
run: | |
conan install -pr:b ./conan_profiles/linux_gcc -pr:h ./conan_profiles/${{ matrix.os }}_${{ matrix.compiler }} --build=missing -s build_type=${{ matrix.build_type }} -o shared=${{ matrix.shared }} . | |
- name: "Build" | |
run: | | |
if [ "${{ matrix.shared }}" = "True" ]; then | |
lib_type="shared" | |
else | |
lib_type="static" | |
fi | |
ls -l build | |
echo "build folder: ./build/${{ matrix.os }}-${{ matrix.compiler }}-$lib_type" | |
cmake --preset ${{ matrix.os }}-${{ matrix.compiler }}-$lib_type | |
cmake --build ./build/${{ matrix.os }}-${{ matrix.compiler }}-$lib_type --config ${{ matrix.build_type }} |