From 85b41aa0051d9c058dbd5711c9561f653cc9d836 Mon Sep 17 00:00:00 2001 From: Shayne Fletcher Date: Thu, 25 Jan 2024 08:48:40 -0800 Subject: [PATCH] use dtolnay/install-buck2 Summary: using dtolnay/install-buck2@latest to get buck allows us to remove some boilerplate Differential Revision: D53090424 Privacy Context Container: L1122763 fbshipit-source-id: 6ae0593541acef2d28bb6e234a97327bd4c93cb7 --- .github/workflows/buck-build-and-test.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/buck-build-and-test.yml b/.github/workflows/buck-build-and-test.yml index 7d23d3af..ef84934c 100644 --- a/.github/workflows/buck-build-and-test.yml +++ b/.github/workflows/buck-build-and-test.yml @@ -14,19 +14,11 @@ jobs: 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 + - run: sudo apt-get update && sudo apt-get install opam 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 + - run: brew install opam if: matrix.os == 'macos' - - run: | - chmod +x buck2 - sudo ln -s $(pwd)/buck2 /usr/local/bin/buck2 + - uses: dtolnay/install-buck2@latest - run: | opam init --compiler=5.1.1 --disable-sandboxing -y opam env | sed -e "s/ export .*//g" -e "s/'//g" -e "s/\;//g" >> $GITHUB_ENV