forked from mirrors/jj
github: add buck2 ci build
Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
d4cce209d8
commit
4619b1688f
3 changed files with 86 additions and 1 deletions
30
.github/actions/install-dotslash/action.yml
vendored
Normal file
30
.github/actions/install-dotslash/action.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Install DotSlash
|
||||
description: Install DotSlash on the current system
|
||||
inputs:
|
||||
version:
|
||||
description: "version of dotslash"
|
||||
required: false
|
||||
default: "0.4.1"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install DotSlash
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p $RUNNER_TEMP/dotslash
|
||||
echo "$RUNNER_TEMP/dotslash" >> $GITHUB_PATH
|
||||
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
C:\\msys64\\usr\\bin\\wget.exe https://github.com/facebook/dotslash/releases/download/v0.4.1/dotslash-windows.v0.4.1.tar.gz
|
||||
tar xf dotslash-windows.v0.4.1.tar.gz
|
||||
mv dotslash.exe $RUNNER_TEMP/dotslash
|
||||
else
|
||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||
wget https://github.com/facebook/dotslash/releases/download/v0.4.1/dotslash-macos.v0.4.1.tar.gz
|
||||
tar xf dotslash-macos.v0.4.1.tar.gz
|
||||
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||
wget https://github.com/facebook/dotslash/releases/download/v0.4.1/dotslash-ubuntu-22.04.x86_64.v0.4.1.tar.gz
|
||||
tar xf dotslash-ubuntu-22.04.x86_64.v0.4.1.tar.gz
|
||||
fi
|
||||
mv dotslash $RUNNER_TEMP/dotslash
|
||||
fi
|
55
.github/workflows/build-buck2.yml
vendored
Normal file
55
.github/workflows/build-buck2.yml
vendored
Normal file
|
@ -0,0 +1,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
|
|
@ -216,6 +216,6 @@ default_platforms = [
|
|||
("arm64", "macos"),
|
||||
#("arm64", "windows"),
|
||||
("x86_64", "linux"),
|
||||
#("x86_64", "macos"),
|
||||
("x86_64", "macos"),
|
||||
("x86_64", "windows"),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue