Skip to content

WIP: ci: add IBM-hosted ppc64le and s390x runners #9464

WIP: ci: add IBM-hosted ppc64le and s390x runners

WIP: ci: add IBM-hosted ppc64le and s390x runners #9464

Workflow file for this run

name: Sanity checks
on:
pull_request:
push:
branches: ['*']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prelude:
name: Initial checks
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.cache-key }}
matrix-alpine: ${{ steps.alpine.outputs.matrix }}
matrix-ubuntu: ${{ steps.ubuntu.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install packages
run: |
python3 -m pip install license-expression PyYAML
python3 -m pip install --pre meson
- name: Calculate cache key
id: cache-key
run: echo "cache-key=packagecache-$(tools/internalize_sources.py cache-key)" >> $GITHUB_OUTPUT
- name: Restore sources
id: restore
uses: actions/cache/restore@v4
with:
key: ${{ steps.cache-key.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
- name: Download sources
if: steps.restore.outputs.cache-hit != 'true'
run: tools/internalize_sources.py download
- name: Save sources
uses: actions/cache/save@v4
if: steps.restore.outputs.cache-hit != 'true'
with:
key: ${{ steps.cache-key.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
- name: Quick checks
env:
TEST_ANNOTATE_CONTEXT: yes
TEST_SKIP_BUILD: yes
run: |
./tools/fake_tty.py ./tools/sanity_checks.py
- name: Build Ubuntu matrix
id: ubuntu
shell: ./tools/filter_matrix.py {0}
run: |
- platform: aarch64
runner: ubuntu-24.04-arm
- platform: ppc64le
runner: ubuntu-24.04-ppc64le
selfhosted: true
- platform: s390x
runner: ubuntu-24.04-s390x
selfhosted: true
- platform: x86_64
runner: ubuntu-latest
- name: Build Alpine matrix
id: alpine
shell: ./tools/filter_matrix.py {0}
run: |
- platform: aarch64
runner: ubuntu-24.04-arm
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/aarch64/apk.static#!sha256!27a975638ddc95a411c9f17c63383e335da9edf6bb7de2281d950c291a11f878'
- platform: armv7
runner: ubuntu-24.04-arm
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/aarch64/apk.static#!sha256!27a975638ddc95a411c9f17c63383e335da9edf6bb7de2281d950c291a11f878'
- platform: ppc64le
runner: ubuntu-24.04-ppc64le
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/ppc64le/apk.static#!sha256!96ba92b49c8cc97fad06f0dfe3c50ec25c3344890e479999ded8752bf9e80d7f'
selfhosted: true
- platform: riscv64
runner: ubuntu-24.04-arm
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/aarch64/apk.static#!sha256!27a975638ddc95a411c9f17c63383e335da9edf6bb7de2281d950c291a11f878'
- platform: s390x
runner: ubuntu-24.04-s390x
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/s390x/apk.static#!sha256!368996f2908ec8f10f1de500bc97a9bd1c3b0b46ce0bd44983ac09862cbab6d5'
selfhosted: true
- platform: x86
runner: ubuntu-latest
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/x86_64/apk.static#!sha256!bdd044e0fd6cc388c5e571e1093efa5f35f7767cc5aa338b0a2576a429009a62'
- platform: x86_64
runner: ubuntu-latest
apk-tools-url: 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.7/x86_64/apk.static#!sha256!bdd044e0fd6cc388c5e571e1093efa5f35f7767cc5aa338b0a2576a429009a62'
Ubuntu:
name: Ubuntu (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
needs: prelude
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prelude.outputs.matrix-ubuntu) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install packages
run: |
sudo apt-get update
sudo apt-get -y install build-essential python3-pip ninja-build
python3 -m pip install license-expression
python3 -m pip install --pre meson
- name: Restore sources
uses: actions/cache/restore@v4
with:
key: ${{ needs.prelude.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Sanity Checks
run: |
./tools/internalize_sources.py rewrite
./tools/fake_tty.py ./tools/sanity_checks.py
- name: Report Meson version dependencies
if: matrix.platform == 'x86_64'
continue-on-error: true
env:
TEST_MESON_VERSION_DEPS: 1
run: |
./tools/fake_tty.py ./tools/sanity_checks.py TestReleases.test_meson_version_deps
Alpine:
name: Alpine (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
needs: prelude
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prelude.outputs.matrix-alpine) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: jirutka/setup-alpine@v1
with:
arch: ${{ matrix.platform }}
apk-tools-url: ${{ matrix.apk-tools-url }}
packages: >
binutils clang libc-dev fortify-headers make patch cmake git linux-headers pkgconf py3-pip samurai sudo
# https://github.com/jirutka/setup-alpine/pull/22
- name: Disable QEMU emulation
if: matrix.platform == 'armv7'
run: sudo update-binfmts --disable qemu-arm
- name: Restore sources
uses: actions/cache/restore@v4
with:
key: ${{ needs.prelude.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Sanity Checks
env:
CC: clang
CXX: clang++
run: |
# Work around PEP 668 nonsense…
sudo rm -vf /usr/lib*/python3.*/EXTERNALLY-MANAGED
python -m pip install license-expression
python -m pip install --pre meson
if grep -q qemu /proc/$$/cmdline; then
export TEST_TIMEOUT_MULTIPLIER=10
echo "CPU emulation detected; increasing test timeouts by ${TEST_TIMEOUT_MULTIPLIER}x"
fi
./tools/internalize_sources.py rewrite
./tools/fake_tty.py ./tools/sanity_checks.py
shell: alpine.sh {0}
VisualStudio:
runs-on: windows-latest
needs: prelude
strategy:
fail-fast: false
matrix:
platform: ['x64', 'x86']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Install a 32-bit Python so building related stuff work.
- name: Setup x86 Python
if: matrix.platform == 'x86'
uses: actions/setup-python@v5
with:
architecture: 'x86'
python-version: '3.12'
- name: Install packages
run: |
python -m pip install license-expression
python -m pip install --pre meson
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform}}
- name: Restore sources
uses: actions/cache/restore@v4
with:
key: ${{ needs.prelude.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Sanity Checks
run: |
python tools/internalize_sources.py rewrite
python tools/sanity_checks.py
VisualStudio-clang-cl:
runs-on: windows-latest
needs: prelude
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install packages
run: |
python -m pip install license-expression
python -m pip install --pre meson
- name: Restore sources
uses: actions/cache/restore@v4
with:
key: ${{ needs.prelude.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
fail-on-cache-miss: true
- uses: ilammy/msvc-dev-cmd@v1
- name: Sanity Checks
env:
CC: clang-cl
CXX: clang-cl
run: |
python tools/internalize_sources.py rewrite
python tools/sanity_checks.py
MSYS2:
runs-on: windows-latest
needs: prelude
strategy:
fail-fast: false
matrix:
platform: ['UCRT64', 'CLANG64']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.platform}}
install: >-
bison
dos2unix
flex
git
pacboy: >-
cc:p
cmake:p
ninja:p
pkgconf:p
python-certifi:p
python-pip:p
# Make sure Python is updated to >=3.11 (fix https://github.com/msys2/MINGW-packages/issues/17415).
update: true
- name: Install packages
shell: msys2 {0}
run: |
python -m pip install license-expression
python -m pip install --pre meson
- name: Restore sources
uses: actions/cache/restore@v4
with:
key: ${{ needs.prelude.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Sanity Checks
shell: msys2 {0}
run: |
python tools/internalize_sources.py rewrite
python tools/sanity_checks.py
MacOS:
name: MacOS (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
needs: prelude
strategy:
fail-fast: false
matrix:
include:
- platform: arm64
runner: macos-14
- platform: x86_64
runner: macos-13
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: brew update
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install packages
run: |
brew install --quiet ninja
python3 -m pip install license-expression
python3 -m pip install --pre meson
- name: Restore sources
uses: actions/cache/restore@v4
with:
key: ${{ needs.prelude.outputs.cache-key }}
path: subprojects/packagecache
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Sanity Checks
run: |
./tools/internalize_sources.py rewrite
./tools/fake_tty.py ./tools/sanity_checks.py