-
Notifications
You must be signed in to change notification settings - Fork 184
72 lines (62 loc) · 2.17 KB
/
Copy pathnightly.yml
File metadata and controls
72 lines (62 loc) · 2.17 KB
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
70
71
72
name: Nightly release
on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"
permissions:
contents: read
jobs:
publish_release:
name: Publish release
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Set version
run: |
echo "RUSTC_PERF_VERSION=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Checkout the source code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 1
persist-credentials: false
- 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@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 18
- name: Compile frontend
run: |
cd site/frontend
npm ci
npm run build
- name: Compile site
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
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@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
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