Skip to content

Commit

Permalink
buck-build-and-test (#57)
Browse files Browse the repository at this point in the history
Summary:
D52847904 finalized the cargo build and test workflow. this diff adds the buck2 build and test workflow.


Test Plan: https://github.com/shayne-fletcher/ocamlrep/actions/runs/7576717554

Differential Revision: D52889705

Pulled By: shayne-fletcher
  • Loading branch information
Shayne Fletcher authored and facebook-github-bot committed Jan 18, 2024
1 parent 18d14fd commit 54838c7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/buck-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Buck build and test
on:
push:
pull_request:
workflow_dispatch:
jobs:
buck-build-and-test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: |
sudo apt-get update && sudo apt-get install opam
wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst
zstd -d buck2-x86_64-unknown-linux-gnu.zst -o buck2
if: matrix.os == 'ubuntu'
- run: |
brew install opam
wget https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-apple-darwin.zst
zstd -d buck2-x86_64-apple-darwin.zst -o buck2
if: matrix.os == 'macos'
- run: |
chmod +x buck2
sudo ln -s $(pwd)/buck2 /usr/local/bin/buck2
- run: |
opam init --compiler=5.1.1 --disable-sandboxing -y
opam env | sed "s/ export .*//g" | sed "s/'//g" | sed "s/\;//g" >> $GITHUB_ENV
- run: ./ocaml-setup.sh
- run: cargo install --git https://github.com/facebookincubator/reindeer.git reindeer --force
- run: reindeer --third-party-dir shim/third-party/rust buckify
- run: buck2 build shim//third-party/... -v 2
- run: buck2 build root//... -v 2
2 changes: 1 addition & 1 deletion .github/workflows/cargo-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: matrix.os == 'macos'
- run: |
opam init --compiler=5.1.1 --disable-sandboxing -y
opam env | sed "s/export .*//g" | sed "s/'//g" | sed "s/\;//g" >> $GITHUB_ENV
opam env | sed "s/ export .*//g" | sed "s/'//g" | sed "s/\;//g" >> $GITHUB_ENV
- run: ./ocaml-setup.sh
- run: cargo build
- run: cargo test

0 comments on commit 54838c7

Please sign in to comment.