Nightly Release Linux x86_64 #491
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 9 * * *' | |
name: Nightly Release Linux x86_64 | |
jobs: | |
build: | |
name: build and package nightly release | |
runs-on: [self-hosted, i7-6700K] | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: create version.txt | |
run: ./ci/write_version.sh | |
- name: build release with lto | |
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc | |
# target-cpu=x86-64 -> For maximal compatibility for all CPU's. This was also faster in our tests: https://roc.zulipchat.com/#narrow/stream/231635-compiler-development/topic/.2Ecargo.2Fconfig.2Etoml/near/325726299 | |
- name: get commit SHA | |
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | |
- name: get date | |
run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV | |
- name: build wasm repl | |
run: ./ci/www-repl.sh | |
- name: Upload wasm repl tar. Actually uploading to github releases has to be done manually. | |
uses: actions/upload-artifact@v3 | |
with: | |
name: roc_repl_wasm.tar.gz | |
path: roc_repl_wasm.tar.gz | |
retention-days: 4 | |
- name: build file name | |
env: | |
DATE: ${{ env.DATE }} | |
SHA: ${{ env.SHA }} | |
run: echo "RELEASE_FOLDER_NAME=roc_nightly-linux_x86_64-$DATE-$SHA" >> $GITHUB_ENV | |
# this makes the roc binary a lot smaller | |
- name: strip debug info | |
run: strip ./target/release-with-lto/roc | |
- name: Make nightly release tar archive | |
run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }} | |
- name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz | |
path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz | |
retention-days: 4 |