-
Notifications
You must be signed in to change notification settings - Fork 324
55 lines (50 loc) · 1.66 KB
/
build-buck2.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
name: buck2
on:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
buck2:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
abi: x86_64-unknown-linux-gnu
- os: windows-latest
abi: x86_64-pc-windows-msvc
- os: macos-latest
abi: aarch64-apple-darwin
# NOTE: macos-13 is the most recent x86_64 macos runner
#- os: macos-13
# abi: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
timeout-minutes: 15 # NOTE (aseipp): keep in-sync with the build.yml timeout limit
name: build with buck2
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: (Linux) Install Mold
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install -y mold
- name: Install DotSlash
uses: ./.github/actions/install-dotslash
- name: Add build tools to $PATH
run: echo "$PWD/tools/bin" >> $GITHUB_PATH
# FIXME (aseipp): use 'buck2' out of `$PATH` after we have dotslash .exe
# shim files for windows. until then just invoke manually
- name: buck2 build //...
run: |
mkdir -p out
dotslash ./tools/bin/buck2 build @mode//debug //...
cp buck-out/v2/log/*.pb.zst out
dotslash ./tools/bin/buck2 build @mode//debug cli --out out/jj.exe
./out/jj.exe version
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: jj-${{ matrix.abi }}
path: out
retention-days: 14