-
Notifications
You must be signed in to change notification settings - Fork 1.8k
76 lines (63 loc) · 2.21 KB
/
build-macos.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build on Mac OS
run-name: Build on Mac OS
on:
merge_group:
paths:
- '.github/workflows/build-macos.yaml'
- '**.go'
- 'go.mod'
- 'go.sum'
- '**.rs'
- 'Cargo.toml'
- 'Cargo.lock'
- 'build.assets/Makefile'
- 'build.assets/Dockerfile*'
- 'Makefile'
jobs:
build:
name: Build on Mac OS
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
runs-on: macos-13-xl-arm64
permissions:
contents: read
steps:
# This is necessary on macos arm64 runners because the .cache and
# .config dirs on the runner are owned by root not the "runner" user.
- name: Fix home dir perms
run: sudo chown -R $(id -u):$(id -g) $HOME/.cache $HOME/.config
- name: Checkout Teleport
uses: actions/checkout@v4
- name: Determine Toolchain Versions and cache paths
run: |
echo NODE_VERSION=$(make -C build.assets print-node-version) >> $GITHUB_ENV
echo GOLANG_VERSION=$(make -C build.assets print-go-version | sed 's/^go//') >> $GITHUB_ENV
echo RUST_VERSION=$(make -C build.assets print-rust-version) >> $GITHUB_ENV
echo WASM_PACK_VERSION=$(make -C build.assets print-wasm-pack-version) >> $GITHUB_ENV
echo PKG_CONFIG_PATH="$(build.assets/build-fido2-macos.sh pkg_config_path)" >> $GITHUB_ENV
- name: Print versions
run: |
echo "make: $(make --version)"
echo "node: ${NODE_VERSION}"
echo "go: ${GOLANG_VERSION}"
echo "rust: ${RUST_VERSION}"
echo "wasm-pack: ${WASM_PACK_VERSION}"
- name: Install Node Toolchain
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup yarn
run: |
corepack enable yarn
- name: Install Go Toolchain
uses: actions/setup-go@v5
with:
cache: false
go-version: ${{ env.GOLANG_VERSION }}
- name: Configure Rust Toolchain
run: |
rustup override set ${{ env.RUST_VERSION }}
- name: Install wasm-pack
run: |
cargo install wasm-pack --locked --version ${WASM_PACK_VERSION}
- name: Build
run: make binaries