Skip to content

Commit 32e70d3

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 One notable difference is that we use RISE's RISC-V Runners for the steps which would otherwise run the setup-qemu action. AI-Generated: Uses Claude Code Sonnet 4.7 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
1 parent 60cf1d0 commit 32e70d3

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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+
docker run --platform=linux/riscv64 -w /root --rm \
83+
-e PIP_PREFER_BINARY=1 \
84+
-e PIP_EXTRA_INDEX_URL \
85+
-v "$PWD":/root \
86+
riscv64/ubuntu:24.04 ./list-packages.sh wb
87+
88+
pip_audit:
89+
runs-on: ubuntu-24.04-riscv
90+
continue-on-error: true
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Run pip-audit inside riscv64 container
95+
working-directory: ci_scripts
96+
run: |
97+
docker run --platform=linux/riscv64 -w /root --rm \
98+
-e PIP_PREFER_BINARY=1 \
99+
-e PIP_EXTRA_INDEX_URL \
100+
-v "$PWD":/root \
101+
riscv64/ubuntu:24.04 ./audit.sh wb

0 commit comments

Comments
 (0)