-
Notifications
You must be signed in to change notification settings - Fork 364
60 lines (59 loc) · 1.75 KB
/
setup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Setup
description: Specific steps to install dependencies shared between actions
inputs:
platform:
required: true
arch:
required: true
runs:
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: yarn
node-version: lts/*
- name: Install linux dependencies
if: ${{ inputs.platform }} == 'linux'
run: |
sudo apt-get -y update
sudo apt-get -y install make nodejs
sudo snap install zig --classic --beta
- name: Setup Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- name: Install MacOS dependencies
if: ${{ inputs.platform }} == 'darwin'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install zig make
- name: Install Windows dependencies
if: ${{ inputs.platform }} == 'windows'
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
scoop install make zig
shell: pwsh
- name: Install JavaScript deps
run: |
corepack enable
yarn
- name: Run tests
if: "!(matrix.arch == 'aarch64' && matrix.platform == 'linux')"
run: |
make test-ci
- name: Run tests
if: "matrix.arch == 'aarch64' && matrix.platform == 'linux'"
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER: qemu-aarch64
CURRENT_TARGET: aarch64-unknown-linux-musl
run: |
sudo apt-get install -y \
qemu-system-arm \
qemu-efi-aarch64 \
qemu-utils \
qemu-user
make test-ci