Skip to content

Commit 2f3a5e2

Browse files
committed
CI: package stage1 toolchain as downloadable artifact
Every green build now produces a rustc-decisive tarball (uploaded as GitHub Actions artifact, 90-day retention). Tagged builds (v*) also create a GitHub Release with install instructions. https://claude.ai/code/session_01JWiQ9rhpzDZxVdAUcvZjxF
1 parent fb1e80c commit 2f3a5e2

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/decisive-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,40 @@ jobs:
6262

6363
- name: Run compiler tests (decisive trait)
6464
run: python3 x.py test tests/ui --stage 1 --test-args "decisive"
65+
66+
- name: Package stage1 toolchain
67+
run: |
68+
STAGE1=build/x86_64-unknown-linux-gnu/stage1
69+
DEST=rustc-decisive-x86_64-unknown-linux-gnu
70+
mkdir -p "$DEST"
71+
cp -a "$STAGE1/bin" "$DEST/"
72+
cp -a "$STAGE1/lib" "$DEST/"
73+
echo "decisive-stage1 ($(git rev-parse --short HEAD))" > "$DEST/VERSION"
74+
tar czf "$DEST.tar.gz" "$DEST"
75+
echo "TOOLCHAIN_ARCHIVE=$DEST.tar.gz" >> "$GITHUB_ENV"
76+
echo "TOOLCHAIN_NAME=$DEST" >> "$GITHUB_ENV"
77+
78+
- name: Upload toolchain artifact
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: rustc-decisive-x86_64-unknown-linux-gnu
82+
path: ${{ env.TOOLCHAIN_ARCHIVE }}
83+
retention-days: 90
84+
85+
- name: Create GitHub Release
86+
if: startsWith(github.ref, 'refs/tags/v')
87+
uses: softprops/action-gh-release@v2
88+
with:
89+
files: ${{ env.TOOLCHAIN_ARCHIVE }}
90+
body: |
91+
## Rust with Decisive Trait
92+
93+
Custom rustc build with the `Decisive` trait, enabling user-defined
94+
short-circuiting `&&` and `||` operators.
95+
96+
### Install
97+
```bash
98+
tar xzf ${{ env.TOOLCHAIN_NAME }}.tar.gz
99+
rustup toolchain link decisive ./${{ env.TOOLCHAIN_NAME }}
100+
cargo +decisive build
101+
```

0 commit comments

Comments
 (0)