Skip to content

Commit c0a58e9

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 28a9782 commit c0a58e9

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

.github/workflows/nightly.yml

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

0 commit comments

Comments
 (0)