Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/actions/setup-opensuse/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Setup openSUSE Tumbleweed Snapshot"
description: "Configures zypper to use a stable historical snapshot to bypass CDN flakiness"
runs:
using: "composite"
steps:
- name: Fetch latest stable snapshot date
uses: actions/github-script@v9
id: get-snapshot
with:
script: |
const response = await fetch("https://openqa.opensuse.org/api/v1/job_groups/1/build_results");
const data = await response.json();
// Use index 2 (the 3rd most recent snapshot, roughly 2-3 days old)
// to ensure all global mirrors have fully synced the RPM packages.
// This avoids 404s/timeouts on regional mirrors that lag behind
// live releases.
return data.build_results[2].build;
result-encoding: string
- name: Setup openSUSE snapshot repository
shell: bash
run: |
SNAPSHOT="${{ steps.get-snapshot.outputs.result }}"
echo "Using snapshot: $SNAPSHOT"
zypper rr --all
zypper ar -f http://download.opensuse.org/history/$SNAPSHOT/tumbleweed/repo/oss/ repo-oss
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
image: opensuse/tumbleweed

steps:
- uses: actions/checkout@v6
- name: Setup openSUSE snapshot repository
uses: ./.github/actions/setup-opensuse
- run: |
${{ env.RETRY }} zypper -n install \
binutils clang${{ matrix.llvm }}-devel cmake flex gcc-c++ llvm${{ matrix.llvm }}-devel \
Expand All @@ -55,7 +58,6 @@ jobs:
make-default: false
- run: ld --version
- run: nproc
- uses: actions/checkout@v6
- name: build
run: |
mkdir objdir
Expand Down Expand Up @@ -131,8 +133,10 @@ jobs:
image: opensuse/tumbleweed

steps:
- run: ${{ env.RETRY }} zypper -n install python3-pip
- uses: actions/checkout@v6
- name: Setup openSUSE snapshot repository
uses: ./.github/actions/setup-opensuse
- run: ${{ env.RETRY }} zypper -n install python3-pip
- run: ${{ env.RETRY }} pip install --break-system-packages ruff
- run: ruff check
- run: ruff format --diff
Expand All @@ -144,8 +148,10 @@ jobs:
image: opensuse/tumbleweed

steps:
- run: ${{ env.RETRY }} zypper -n install binutils clang-devel cmake flex gcc-c++ llvm-devel python312
- uses: actions/checkout@v6
- name: Setup openSUSE snapshot repository
uses: ./.github/actions/setup-opensuse
- run: ${{ env.RETRY }} zypper -n install binutils clang-devel cmake flex gcc-c++ llvm-devel python312
- name: prepare venv
# Pytype currently only supports Python <=3.12
run: |
Expand All @@ -171,13 +177,15 @@ jobs:
image: opensuse/tumbleweed

steps:
- uses: actions/checkout@v6
- name: Setup openSUSE snapshot repository
uses: ./.github/actions/setup-opensuse
- run: |
${{ env.RETRY }} zypper -n install \
binutils clang-devel cmake flex gcc-c++ llvm-devel python3 python3-pyright \
python3-Pebble python3-pytest python3-pytest-mock python3-pytest-subprocess \
unifdef python3-psutil curl git python3-chardet findutils sudo wget python3-jsonschema \
python3-msgspec python3-zstandard
- uses: actions/checkout@v6
- run: mkdir objdir
- run: cmake ..
working-directory: objdir
Expand Down
Loading