diff options
| author | Stephanos Ioannidis <root@stephanos.io> | 2024-10-03 23:41:23 +0900 |
|---|---|---|
| committer | Stephanos Ioannidis <root@stephanos.io> | 2024-10-04 01:08:21 +0900 |
| commit | 46b413384a4f91b9251d39491293ed2cacfab5ff (patch) | |
| tree | 4cbdbc3b3e2679825fd935b9ff1c8ef5813ac06c /.github/workflows | |
| parent | 61128d10122f97e209f24ea7604be33e01ad74a3 (diff) | |
ci: Add Python test workflow
This commit adds a GitHub Actions CI workflow that runs the full
testsuite with the "release test" script using various Python versions
and host operating systems.
Note that the testing on Windows host is currently disabled because the
test scripts do not correctly handle Windows paths at this time.
Also note that Python 2.7 is not tested because it is now archaic and
supporting it is pointless.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/test.yml | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..87b27bf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,148 @@ +name: Test + +on: + push: + branches: + - main + - v*-branch + pull_request: + branches: + - main + - v*-branch + workflow_call: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Test (Python ${{ matrix.target.python }}, ${{ matrix.target.os }}) + runs-on: ${{ matrix.target.builder }} + + defaults: + run: + shell: bash + + strategy: + fail-fast: false + matrix: + # NOTE: Testing of the Windows targets are currently disabled because + # the test script is simply not ready for it. + target: + # Python 3.6 + - python: '3.6' + os: Linux + builder: ubuntu-20.04 + - python: '3.6' + os: macOS + builder: macos-13 + # - python: '3.6' + # os: Windows + # builder: windows-2019 + # Python 3.7 + - python: '3.7' + os: Linux + builder: ubuntu-20.04 + - python: '3.7' + os: macOS + builder: macos-13 + # - python: '3.7' + # os: Windows + # builder: windows-2019 + # Python 3.8 + - python: '3.8' + os: Linux + builder: ubuntu-20.04 + - python: '3.8' + os: macOS + builder: macos-13 + # - python: '3.8' + # os: Windows + # builder: windows-2019 + # Python 3.9 + - python: '3.9' + os: Linux + builder: ubuntu-20.04 + - python: '3.9' + os: macOS + builder: macos-13 + # - python: '3.9' + # os: Windows + # builder: windows-2019 + # Python 3.10 + - python: '3.10' + os: Linux + builder: ubuntu-22.04 + - python: '3.10' + os: macOS + builder: macos-14 + # - python: '3.10' + # os: Windows + # builder: windows-2022 + # Python 3.11 + - python: '3.11' + os: Linux + builder: ubuntu-22.04 + - python: '3.11' + os: macOS + builder: macos-14 + # - python: '3.11' + # os: Windows + # builder: windows-2022 + # Python 3.12 + - python: '3.12' + os: Linux + builder: ubuntu-22.04 + - python: '3.12' + os: macOS + builder: macos-14 + # - python: '3.12' + # os: Windows + # builder: windows-2022 + + steps: + - name: Set up environment + run: | + if [ "${{ runner.os }}" == "Windows" ]; then + # Disable file name validation on Windows because Linux source tree + # contains potentially problematic file names. + git config --global core.protectNTFS false + fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.target.python }} + + - name: Check Python version + run: | + set -x + python --version + pip --version + python -c "import platform; print(platform.architecture())" + + - name: Install Python dependencies + run: | + pip install --user setuptools wheel + + - name: Check out Linux source code + uses: actions/checkout@v4 + # On Windows, checkout of 'aux.c' is expected to fail because ... Windows. + continue-on-error: true + with: + repository: torvalds/linux + ref: v5.4 + + - name: Check out Kconfiglib source code + uses: actions/checkout@v4 + with: + path: Kconfiglib + + - name: Apply Linux Kconfig Makefile patch + run: | + git apply Kconfiglib/makefile.patch + + - name: Run testsuite + run: | + Kconfiglib/tests/reltest python |
