roc/.github/workflows/nightly_macos_x86_64.yml

66 lines
2.0 KiB
YAML
Raw Normal View History

on:
schedule:
- cron: '0 9 * * *' # 9=9am utc+0
2022-06-24 16:32:28 +03:00
name: Nightly Release macOS x86_64
env:
ZIG_VERSION: 0.9.1
2022-06-25 17:22:15 +03:00
LLVM_SYS_130_PREFIX: /usr/local/opt/llvm
2022-06-24 16:32:28 +03:00
jobs:
test-build-upload:
name: build, test, package and upload nightly release
2022-06-24 16:32:28 +03:00
runs-on: [macos-12]
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
2022-06-24 16:32:28 +03:00
- name: Install zig
run: |
curl -L -o zig.tar.xz https://ziglang.org/download/${ZIG_VERSION}/zig-macos-x86_64-${ZIG_VERSION}.tar.xz && tar -xf zig.tar.xz
echo "${GITHUB_WORKSPACE}/zig-macos-x86_64-${ZIG_VERSION}" >> $GITHUB_PATH
- name: zig version
run: zig version
2022-06-25 16:52:17 +03:00
- name: Install LLVM
run: brew install llvm@13
2022-08-02 09:49:24 +03:00
# build has to be done before tests #2572
- name: build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked
2022-06-24 16:32:28 +03:00
- name: execute rust tests
uses: actions-rs/cargo@v1
with:
command: test
args: --release --locked -- --skip opaque_wrap_function --skip bool_list_literal
- 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 file name
env:
DATE: ${{ env.DATE }}
SHA: ${{ env.SHA }}
run: echo "RELEASE_TAR_FILENAME=roc_nightly-macos_x86_64-$DATE-$SHA.tar.gz" >> $GITHUB_ENV
2022-06-24 16:32:28 +03:00
- name: write version to file
run: ./ci/write_version.sh
2022-06-24 16:32:28 +03:00
- name: package release
run: ./ci/package_release.sh ${{ env.RELEASE_TAR_FILENAME }}
- name: Upload artifact. Actually uploading to github releases has to be done manually.
uses: actions/upload-artifact@v3
2022-06-24 16:32:28 +03:00
with:
name: ${{ env.RELEASE_TAR_FILENAME }}
path: ${{ env.RELEASE_TAR_FILENAME }}
retention-days: 4
2022-06-24 16:32:28 +03:00