diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-07 21:01:23 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-08 09:10:26 +0100 |
commit | 1c121b8a9a5f4916990adcd16070a0124b0e8fbe (patch) | |
tree | 7f8a9ab16017cf7ef90872cbc2fe91b5fffce474 /.github/workflows | |
parent | workflows/test: upgrade actions (diff) | |
download | build-boost-test.tar.gz build-boost-test.zip |
workflows/test: test building Boost.Pythontest
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/python.yml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..42c8386 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,57 @@ +name: Boost.Python + +on: + push: + pull_request: + schedule: + # Weekly, at 5:45 AM on Friday (somewhat randomly chosen). + - cron: '45 5 * * 5' + workflow_dispatch: + +jobs: + python: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + include: + - version: '1.78.0' + + runs-on: '${{ matrix.os }}' + + name: 'Boost.Python: ${{ matrix.version }} / ${{ matrix.os }}' + + defaults: + run: + shell: pwsh + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Cache Boost + uses: actions/cache@v3 + with: + path: '${{ runner.workspace }}/boost_*.tar.gz' + key: 'boost-${{ matrix.version }}' + + - id: build + name: Build Boost + uses: ./ + with: + version: '${{ matrix.version }}' + libraries: python + + - name: Fix PATH + run: | + $bin_dir = & python -c "import sysconfig; print(sysconfig.get_path('scripts', 'nt_user'))" + echo $bin_dir >> $env:GITHUB_PATH + if: runner.os == 'Windows' + + - name: Build an example module + run: | + cmake-build --platform x64 --boost '${{ steps.build.outputs.root }}' --configuration Release -- ./examples/python/ |