roc/.github/workflows/nightly_macos_x86_64.yml
2022-06-24 18:07:34 +02:00

67 lines
2.3 KiB
YAML

on: [pull_request]
name: Nightly Release macOS x86_64
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ZIG_VERSION: 0.9.1
jobs:
test-and-build:
name: Rust tests, build and package nightly release
runs-on: [macos-12]
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
- 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
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "13.0.1"
- name: set Clang up properly
run: |
LLVM_PATH=${{ env.LLVM_PATH }}
LLVM_VERSION=13.0.1
echo "CPATH=$LLVM_PATH/lib/clang/$LLVM_VERSION/include/" >> $GITHUB_ENV
echo "LDFLAGS=-L$LLVM_PATH/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$LLVM_PATH/include" >> $GITHUB_ENV
echo "CC=$LLVM_PATH/bin/clang" >> $GITHUB_ENV
echo "CXX=$LLVM_PATH/bin/clang++" >> $GITHUB_ENV
- name: install tree for debugging
run: brew install tree
- name: execute rust tests
uses: actions-rs/cargo@v1
with:
command: test
args: --locked # no --release yet until #3166 is fixed
- name: write version to file
run: ./ci/write_version.sh
- name: build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked
- name: package release
run: ./ci/package_release.sh roc_darwin_x86_64.tar.gz
- name: Create pre-release with test_archive.tar.gz
uses: Anton-4/deploy-nightly@1609d8dfe211b078674801113ab7a2ec2938b2a9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/rtfeldman/roc/releases/51880579/assets{?name,label}
release_id: 51880579
asset_path: ./roc_darwin_x86_64.tar.gz
asset_name: roc_nightly-macos_x86_64-$$.tar.gz # $$ inserts 6 char commit hash and date (YYYY-MM-DD)
asset_content_type: application/gzip
max_releases: 3