Skip to content

Build MacOS

Build MacOS #17

Workflow file for this run

name: Build MacOS
on:
workflow_call:
inputs:
profiles:
type: string
required: true
workflow_dispatch:
inputs:
profiles:
type: string
default: '[{ "name": "debug", "flags": "" }]'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
TERM: xterm-256color
jobs:
macos:
strategy:
matrix:
profiles: ${{ fromJson(inputs.profiles) }}
arch:
- name: aarch64
image: macos-14
- name: x86
image: macos-13
fail-fast: false
runs-on: ${{ matrix.arch.image }}
name: macos-${{ matrix.arch.name }} (${{ matrix.profiles.name }})
env:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v4
- name: "Install: Packages"
run: brew install protobuf binaryen
- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
- name: "ACTIONS: Setup caching"
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.profiles.name }}"
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: "Install: cargo-nextest"
run: curl -LsSf https://get.nexte.st/latest/mac | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: "Build: Node"
# the node is not used in the following test sequence,
# so we just check compilation
if: ${{ matrix.profiles.name == 'release' }}
run: cargo build -p gear-cli --release --locked
- name: "Check: Stack height limit"
# no need to run check twice
if: ${{ matrix.profiles.name == 'release' }}
run: cargo run -p calc-stack-height --release --locked
- name: "Test: Lazy pages"
run: >-
cargo nextest run
-p "pallet-*"
-p gear-lazy-pages
-p gear-runtime-interface
${{ matrix.profiles.flags }}