|
| 1 | +# |
| 2 | +# Continuous Integration Workflow libseccomp Python Code |
| 3 | +# |
| 4 | +# Copyright (c) 2025 Oracle and/or its affiliates. |
| 5 | +# Author: Tom Hromatka <tom.hromatka@oracle.com> |
| 6 | +# |
| 7 | + |
| 8 | +# |
| 9 | +# This library is free software; you can redistribute it and/or modify it |
| 10 | +# under the terms of version 2.1 of the GNU Lesser General Public License as |
| 11 | +# published by the Free Software Foundation. |
| 12 | +# |
| 13 | +# This library is distributed in the hope that it will be useful, but WITHOUT |
| 14 | +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 15 | +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
| 16 | +# for more details. |
| 17 | +# |
| 18 | +# You should have received a copy of the GNU Lesser General Public License |
| 19 | +# along with this library; if not, see <http://www.gnu.org/licenses>. |
| 20 | +# |
| 21 | + |
| 22 | +name: Python Continuous Integration |
| 23 | +on: ["push", "pull_request"] |
| 24 | + |
| 25 | +jobs: |
| 26 | + build-wheel: |
| 27 | + name: Build Wheel |
| 28 | + runs-on: ubuntu-latest |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v2 |
| 31 | + - name: Initialize libseccomp |
| 32 | + uses: ./.github/actions/setup |
| 33 | + - name: Build libseccomp |
| 34 | + run: | |
| 35 | + ./configure --enable-python |
| 36 | + make check-build |
| 37 | + - name: Build wheel |
| 38 | + run: make python-wheel |
| 39 | + |
| 40 | + build-wheel-pip: |
| 41 | + name: Build Wheels |
| 42 | + runs-on: ${{ matrix.os }} |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04, ubuntu-22.04-arm] |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@v2 |
| 48 | + - name: Initialize libseccomp |
| 49 | + uses: ./.github/actions/setup |
| 50 | + - name: Install cibuildwheel |
| 51 | + run: python -m pip install cibuildwheel |
| 52 | + - name: Build libseccomp |
| 53 | + run: | |
| 54 | + ./configure --enable-python |
| 55 | + make check-build |
| 56 | + - name: Build pip wheels |
| 57 | + run: make python-wheel-pip |
| 58 | + - uses: actions/upload-artifact@v4 |
| 59 | + with: |
| 60 | + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} |
| 61 | + path: src/python/wheelhouse/*.whl |
| 62 | + |
| 63 | + flake: |
| 64 | + name: Run Flake |
| 65 | + runs-on: ubuntu-latest |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v2 |
| 68 | + - name: Initialize libseccomp |
| 69 | + uses: ./.github/actions/setup |
| 70 | + - name: Install Flake Dependencies |
| 71 | + run: sudo apt-get install python3-flake8-quotes |
| 72 | + - name: flake8 Lint |
| 73 | + uses: reviewdog/action-flake8@v3 |
| 74 | + with: |
| 75 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments