-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathbuck2.yaml
76 lines (65 loc) · 1.9 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package:
name: buck2
# When bumping the version, you also need to retrieve the specific nightly
# version of rust that is compatible. To determine, go to the following URL:
# - https://github.com/facebook/buck2/blob/<VERSION>/HACKING.md
# Get the version, and update vars.rust-version below.
version: 20250301
epoch: 0
description: "Build system, successor to Buck"
copyright:
- license: MIT
resources:
cpu: 10
memory: 16Gi
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- cargo-auditable
- rustup
- wolfi-base
vars:
rust-version: nightly-2024-10-13
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: 060d0cf7b39eeefdafe38366b851fca9055e2fdd
tag: ${{vars.mangled-package-version}}
- name: Set up Rust
runs: |
# This build requires a specific version of rust nightly.
# Be sure to check docs when bumping to more recent commits (see note at top of file).
rustup install ${{vars.rust-version}}
- name: Configure and build
runs: |
# Set up path
# 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 auditable build --release
mv ../../target/release/buck2 ${{targets.destdir}}/usr/bin/
- uses: strip
update:
enabled: true
manual: true
ignore-regex-patterns:
- 'latest'
github:
identifier: facebook/buck2
use-tag: true
test:
pipeline:
# AUTOGENERATED
- runs: |
buck2 --version
buck2 --help