-
Notifications
You must be signed in to change notification settings - Fork 150
69 lines (59 loc) · 1.86 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Nightly release
on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"
permissions:
contents: write
jobs:
publish_release:
name: Publish release
runs-on: ubuntu-22.04
steps:
- name: Set version
run: |
echo "RUSTC_PERF_VERSION=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Checkout the source code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install stable toolchain
run: |
rustup install $RUST_TOOLCHAIN_VERSION --profile minimal
rustup default $RUST_TOOLCHAIN_VERSION
rustup component add --toolchain $RUST_TOOLCHAIN_VERSION rustfmt clippy
env:
RUST_TOOLCHAIN_VERSION: stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Compile frontend
run: |
cd site/frontend
npm ci
npm run build
- name: Compile site
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin site
- name: Prepare archive
id: archive
run: |
export ARCHIVE_NAME=rustc-perf-${{ env.RUSTC_PERF_VERSION }}-linux-x64.tar.gz
cp target/release/site rustc-perf-site
tar -czvf $ARCHIVE_NAME rustc-perf-site
echo "ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV
- name: Create release
uses: ncipollo/release-action@v1
with:
body: Nightly release of `rustc-perf` (commit `${{ github.sha }}`, date ${{ env.RUSTC_PERF_VERSION }})
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
name: Nightly ${{ env.RUSTC_PERF_VERSION }}
prerelease: true
tag: nightly
commit: ${{ github.sha }}
artifacts: ${{ env.ARCHIVE_NAME }}
removeArtifacts: true