name: ci on: push: pull_request: jobs: build: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] include: - os: ubuntu-latest label: linux - os: macos-latest label: macos - os: windows-latest label: windows steps: - uses: actions/checkout@v4 - name: Configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release - name: Build run: cmake --build build --config Release --parallel - name: Test run: ctest --test-dir build --output-on-failure -C Release # Package the CLI with its runtime assets at the archive root and the # libraries in lib/ below it, so the download can be unpacked and run as it # is: the CLI is beside the shared library and finds it through the rpath # recorded in CMakeLists.txt. - name: Stage run: cmake --install build --config Release --prefix stage - name: Package shell: bash run: | folder="joc_cli_${{ matrix.label }}" mkdir -p "package/$folder/lib" cp -r stage/bin/. "package/$folder/" cp -r stage/lib/. "package/$folder/lib/" - name: Upload uses: actions/upload-artifact@v4 with: name: joc_cli_${{ matrix.label }} path: package/** if-no-files-found: error