Skip to content

[ci] Check macos

[ci] Check macos #19

Workflow file for this run

name: checks MacOS
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
set-image:
# GitHub Actions allows using 'env' in a container context.
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
# This workaround sets the container image for each job using 'set-image' job output.
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT
cargo-check-each-crate-macos:
runs-on: macOS
needs: [set-image]
env:
SKIP_WASM_BUILD: 1
steps:
- uses: actions/checkout@v4
# - name: Install dependencies
# uses: ./.github/actions/set-up-mac
# with:
# IMAGE: ${{ needs.set-image.outputs.IMAGE }}
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
toolchain: 1.77.0
components: rustfmt
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
toolchain: stable-aarch64-apple-darwin
# - name: Install rust
# run: rustup toolchain install nightly
- run: brew install protobuf
- run: rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin
- run: rustup component add rust-src --toolchain stable-aarch64-apple-darwin
- run: rustup component add rust-src rustfmt clippy --toolchain 1.77.0
- run: |
df -h
echo "############# rustup show #############"
rustup show
echo "############# cargo --version #############"
cargo -V | grep 1.77
echo "############# rustup +nightly show #############"
rustup +nightly show
- run: cargo check --workspace --locked
- if: failure()
run: |
sleep 600
# cargo-check-all-crate-macos:
# runs-on: macOS
# needs: [set-image]
# # strategy:
# # fail-fast: false
# # matrix:
# # index: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# uses: ./.github/actions/set-up-mac
# with:
# IMAGE: ${{ needs.set-image.outputs.IMAGE }}
# - name: Run cargo check
# run: |
# source $HOME/.cargo/env
# # PYTHONUNBUFFERED=x .github/scripts/check-each-crate.py ${{ matrix.index }} ${{ strategy.job-total }} --disable_forklift
# cargo check --workspace --locked