Skip to content

Commit d7984bc

Browse files
committed
workflows: nightly: add
Provide a nightly CI workflow for checking: 1. Latest upstream package versions versus those available in the RISE registry 2. Packages which have upstream riscv64 wheels (ready for deprecation in our CI) 3. Check that packages install correctly in a riscv64 container 4. Run pip-audit to scan for vulnerabilities This is based on the following jobs from wheel_builder's .gitlab-ci.yml script: - check_deprecated_packages - check_installation - check_versions - pip_audit Two notable differences compared to the original logic (in addition to the GitLab CI -> GHA rework): 1. We use RISE's RISC-V Runners for the steps which would otherwise run the setup-qemu action. 2. A step is added using the new audit_report.py script to file issues when vulnerabilities are detected. AI-Generated: Uses Claude Code Opus 4.7 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent 2589232 commit d7984bc

1 file changed

Lines changed: 100 additions & 0 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-FileCopyrightText: 2026 The RISE Project
2+
# SPDX-License-Identifier: MIT
3+
4+
name: Run nightly package version and status checks
5+
6+
on:
7+
schedule:
8+
- cron: '0 2 * * *'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
actions: write
15+
issues: read
16+
17+
env:
18+
PIP_EXTRA_INDEX_URL: https://gitlab.com/api/v4/projects/56254198/packages/pypi/simple
19+
20+
jobs:
21+
check_versions:
22+
runs-on: ubuntu-latest
23+
continue-on-error: true
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: '3'
32+
33+
- name: Install Python dependencies
34+
run: pip install requests packaging
35+
36+
- name: Check versions and open PRs
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: python3 ci_scripts/check_versions.py --summary --create-prs
40+
41+
check_deprecated_packages:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- name: Install curl and jq
47+
run: sudo apt-get update -qq && sudo apt-get install -qq -y curl jq
48+
49+
- name: Verify riscv64 wheels still published
50+
run: |
51+
ret=0
52+
while IFS= read -r pkg; do
53+
[[ -z "$pkg" || "$pkg" =~ ^[[:space:]]*# ]] && continue
54+
55+
if ! output=$(curl -sf "https://pypi.org/pypi/${pkg}/json"); then
56+
echo "Failed to fetch $pkg, skipping..."
57+
continue
58+
fi
59+
60+
if ! filenames=$(echo "$output" | jq -r '.urls[].filename'); then
61+
echo "Failed to parse JSON for $pkg, skipping..."
62+
continue
63+
fi
64+
65+
if ! echo "$filenames" | grep -qi riscv; then
66+
echo "$pkg does not distribute riscv64 wheel anymore!"
67+
ret=1
68+
fi
69+
done < ci_scripts/deprecated.txt
70+
exit $ret
71+
72+
check_installation:
73+
runs-on: ubuntu-24.04-riscv
74+
steps:
75+
- uses: actions/checkout@v4
76+
77+
- name: Install packages inside riscv64 container
78+
working-directory: ci_scripts
79+
run: |
80+
sed -Ei 's/^scipy.*$//' packages.txt
81+
sed -Ei 's/^patchelf.*$//' packages.txt
82+
./list-packages.sh python-wheels
83+
84+
pip_audit:
85+
runs-on: ubuntu-24.04-riscv
86+
continue-on-error: true
87+
permissions:
88+
contents: read
89+
issues: write
90+
steps:
91+
- uses: actions/checkout@v4
92+
93+
- name: Run pip-audit
94+
working-directory: ci_scripts
95+
run: ./audit.sh python-wheels
96+
97+
- name: Report vulnerabilities and open issues
98+
env:
99+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
run: python3 ci_scripts/audit_report.py ci_scripts/audit-report.json

0 commit comments

Comments
 (0)