2022-06-27 14:36:46 +03:00
|
|
|
on:
|
|
|
|
schedule:
|
2022-09-05 17:08:58 +03:00
|
|
|
- cron: '0 9 * * *' # 9=9am utc+0
|
2022-06-24 16:32:28 +03:00
|
|
|
|
|
|
|
name: Nightly Release macOS x86_64
|
|
|
|
|
2022-06-24 18:11:23 +03:00
|
|
|
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 18:11:23 +03:00
|
|
|
|
2022-06-24 16:32:28 +03:00
|
|
|
jobs:
|
2022-08-24 20:51:25 +03:00
|
|
|
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:
|
2022-08-19 21:33:52 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-24 16:32:28 +03:00
|
|
|
|
|
|
|
- name: Install zig
|
2022-06-24 18:11:23 +03:00
|
|
|
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-24 20:51:25 +03:00
|
|
|
|
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-08-24 20:51:25 +03:00
|
|
|
|
2022-06-24 16:32:28 +03:00
|
|
|
- name: execute rust tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2022-09-02 17:36:26 +03:00
|
|
|
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-08-24 20:51:25 +03:00
|
|
|
|
2022-06-24 16:32:28 +03:00
|
|
|
- name: write version to file
|
|
|
|
run: ./ci/write_version.sh
|
2022-08-24 20:51:25 +03:00
|
|
|
|
2022-06-24 16:32:28 +03:00
|
|
|
- name: package release
|
2022-09-02 17:36:26 +03:00
|
|
|
run: ./ci/package_release.sh ${{ env.RELEASE_TAR_FILENAME }}
|
2022-08-24 20:51:25 +03:00
|
|
|
|
|
|
|
- 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:
|
2022-09-02 17:36:26 +03:00
|
|
|
name: ${{ env.RELEASE_TAR_FILENAME }}
|
|
|
|
path: ${{ env.RELEASE_TAR_FILENAME }}
|
2022-08-24 20:51:25 +03:00
|
|
|
retention-days: 4
|
2022-06-24 16:32:28 +03:00
|
|
|
|