diff --git a/.github/workflows/buck-build-and-test.yml b/.github/workflows/buck-build-and-test.yml new file mode 100644 index 00000000..aefde409 --- /dev/null +++ b/.github/workflows/buck-build-and-test.yml @@ -0,0 +1,40 @@ +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 + if: matrix.os == 'ubuntu' + - run: brew install opam + if: matrix.os == 'macos' + - run: | + 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 + chmod +x buck2 + sudo ln -s $(pwd)/buck2 /usr/local/bin/buck2 + if: matrix.os == 'ubuntu' + - run: | + 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 + chmod +x buck2 + sudo ln -s $(pwd)/buck2 /usr/local/bin/buck2 + 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 + - 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 diff --git a/.github/workflows/cargo-build-and-test.yml b/.github/workflows/cargo-build-and-test.yml index 64b64e04..e0429f5c 100644 --- a/.github/workflows/cargo-build-and-test.yml +++ b/.github/workflows/cargo-build-and-test.yml @@ -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