Skip to content

Commit 520b1dc

Browse files
committed
CI: Re-write using maintainer tools
Re-write CI using the new maintainer tools script. A few things to note: - Put sanitizer and wasm jobs in their own scripts - Utilize `extra_tests.sh` for additional feature combos - We are exceeding the 20 job limit, see the README Unless I'm made a mistake this shouldn't reduce the test coverage in any way.
1 parent 89facea commit 520b1dc

14 files changed

+566
-243
lines changed

.github/workflows/README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# rust-bitcoin workflow notes
2+
3+
We are attempting to run max 20 parallel jobs using GitHub actions (usage limit for free tier).
4+
5+
ref: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
6+
7+
The minimal/recent lock files are handled by CI (`rust.yml`).
8+
9+
## Jobs
10+
11+
Run from `rust.yml` unless stated otherwise. Total 21 jobs but
12+
`Prepare` is quick and must be run first anyway.
13+
14+
0. `Prepare`
15+
1. `Stable - minimal`
16+
2. `Stable - recent`
17+
3. `Nightly - minimal`
18+
4. `Nightly - recent`
19+
5. `MSRV - minimal`
20+
6. `MSRV - recent`
21+
7. `Lint`
22+
8. `Docs`
23+
9. `Docsrs`
24+
10. `Bench`
25+
11. `Format`
26+
12. `ASAN`
27+
13. `Arch32Bit`
28+
14. `WASM`
29+
15. `NoStd`
30+
<!-- Jobs run from `cross.yaml` -->
31+
16. `Cross testing - aarch64-unknown-linux-gnu`
32+
17. `Cross testing - i686-unknown-linux-gnu`
33+
18. `Cross testing - x86_64-pc-windows-gnu`
34+
19. `Cross testing - x86_64-unknown-linux-gnu`
35+
20. `Cross testing - aarch64-unknown-linux-musl`
36+
21. `Cross testing - arm-unknown-linux-gnueabi`
37+
22. `Cross testing - arm-unknown-linux-gnueabihf`
38+
23. `Cross testing - armv7-unknown-linux-gnueabihf`
39+
24. `Cross testing - powerpc-unknown-linux-gnu`
40+
25. `Cross testing - powerpc64le-unknown-linux-gnu`
41+
26. `Cross testing - riscv64gc-unknown-linux-gnu`
42+
27. `Cross testing - s390x-unknown-linux-gnu`
43+
28. `Cross testing - x86_64-unknown-linux-musl`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Nightly rustc
2+
on:
3+
schedule:
4+
- cron: "0 0 * * 1,4" # runs every Monday and Thursday at 00:00
5+
workflow_dispatch: # allows manual triggering
6+
jobs:
7+
format:
8+
name: Update nightly rustc
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: dtolnay/rust-toolchain@nightly
13+
- name: Update rust.yml to use latest nightly
14+
run: |
15+
set -x
16+
# Not every night has a nightly, so extract the date from whatever
17+
# version of the compiler dtolnay/rust-toolchain gives us.
18+
NIGHTLY_DATE=$(rustc +nightly --verbose --version | sed -ne 's/^commit-date: //p')
19+
# Update the nightly version in the reference file.
20+
echo "nightly-${NIGHTLY_DATE}" > nightly-version
21+
echo "nightly_date=${NIGHTLY_DATE}" >> $GITHUB_ENV
22+
# Some days there is no new nightly. In this case don't make an empty PR.
23+
if ! git diff --exit-code > /dev/null; then
24+
echo "Updated nightly. Opening PR."
25+
echo "changes_made=true" >> $GITHUB_ENV
26+
else
27+
echo "Attempted to update nightly but the latest-nightly date did not change. Not opening any PR."
28+
echo "changes_made=false" >> $GITHUB_ENV
29+
fi
30+
- name: Create Pull Request
31+
if: env.changes_made == 'true'
32+
uses: peter-evans/create-pull-request@v6
33+
with:
34+
token: ${{ secrets.APOELSTRA_CREATE_PR_TOKEN }}
35+
author: Update Nightly Rustc Bot <[email protected]>
36+
committer: Update Nightly Rustc Bot <[email protected]>
37+
title: Automated daily update to rustc (to nightly-${{ env.nightly_date }})
38+
body: |
39+
Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
40+
commit-message: Automated update to Github CI to rustc nightly-${{ env.nightly_date }}
41+
branch: create-pull-request/daily-nightly-update

0 commit comments

Comments
 (0)