-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare CI workflow for nightly releases
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,9 @@ | |
!/collector | ||
!/Cargo.toml | ||
!/Cargo.lock | ||
venv | ||
rust | ||
rust-baseline | ||
instrumentation-data | ||
heaptrack | ||
cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Nightly release | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 23 * * *" | ||
push: | ||
branches: | ||
- ci-nightly | ||
|
||
jobs: | ||
publish_release: | ||
name: Publish release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set version | ||
run: | | ||
echo "RUSTC_PERF_VERSION=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: Checkout the source code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.66.0 | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Compile | ||
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` (`${{ github.sha }}`) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
allowUpdates: true | ||
name: ${{ env.RUSTC_PERF_VERSION }} | ||
prerelease: true | ||
tag: nightly | ||
commit: ${{ github.sha }} | ||
artifacts: ${{ env.ARCHIVE_NAME }} | ||
removeArtifacts: true |