-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathbuck2.yaml
57 lines (49 loc) · 1.41 KB
/
buck2.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
package:
name: buck2
# When bumping, bump the tag below
version: 20240102
epoch: 0
description: "Build system, successor to Buck"
copyright:
- license: MIT
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- libLLVM-16
- rustup
- wolfi-base
vars:
rust-version: nightly-2023-10-01
var-transforms:
- from: ${{package.version}}
match: (\d{4})(\d{2})(\d{2})
replace: $1-$2-$3
to: mangled-package-version
pipeline:
- uses: git-checkout
with:
repository: https://github.com/facebook/buck2
expected-commit: 43803fe6f5af3b2a85f28823b3d0aae966b1ee68
tag: ${{vars.mangled-package-version}}
- name: Configure and build
runs: |
# This build requires a specific version of rust nightly.
# Be sure to check docs when bumping to more recent commits.
rustup install ${{vars.rust-version}}
# This is a bit of a hack, but it's the easiest way to get the right version of rustc and cargo in the path.
export PATH="$HOME/.rustup/toolchains/${{vars.rust-version}}-${{host.triplet.rust}}/bin:$PATH"
mkdir -p ${{targets.destdir}}/usr/bin/
cd app/buck2
cargo build --release
mv ../../target/release/buck2 ${{targets.destdir}}/usr/bin/
- uses: strip
update:
enabled: true
ignore-regex-patterns:
- 'latest'
github:
identifier: facebook/buck2
use-tag: true