Skip to content

Commit

Permalink
Prepare CI workflow for nightly releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Mar 15, 2023
1 parent 9dfaa35 commit b0f366a
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
!/collector
!/Cargo.toml
!/Cargo.lock
venv
rust
rust-baseline
instrumentation-data
heaptrack
cache
58 changes: 58 additions & 0 deletions .github/workflows/nightly.yml
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

0 comments on commit b0f366a

Please sign in to comment.