Advanced features #25
Workflow file for this run
This file contains hidden or 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: Build & Release cpp_unix_bindings | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| release: | |
| types: [ created ] | |
| jobs: | |
| build: | |
| name: Build shared library | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Build in manylinux2014 container | |
| run: | | |
| docker run --rm -v "${{ github.workspace }}:/project" -w /project quay.io/pypa/manylinux2014_x86_64 /bin/bash -c "yum install -y cmake3 devtoolset-11-gcc devtoolset-11-gcc-c++ && ln -sf /usr/bin/cmake3 /usr/bin/cmake && source /opt/rh/devtoolset-11/enable && cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j\$(nproc)" | |
| - name: Upload library artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libcpp_unix_bindings | |
| path: build/libcpp_unix_bindings.so | |
| retention-days: 14 | |
| - name: Attach library to release | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: build/libcpp_unix_bindings.so |