From e81b7410504dcefbb5067642db9f92931e1b09bb Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Wed, 26 Jun 2024 06:21:50 -0500 Subject: [PATCH] github: add buck2 ci build Signed-off-by: Austin Seipp --- .github/actions/install-dotslash/action.yml | 26 ++++++++++++++++ .github/workflows/build-buck2.yml | 34 +++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/actions/install-dotslash/action.yml create mode 100644 .github/workflows/build-buck2.yml diff --git a/.github/actions/install-dotslash/action.yml b/.github/actions/install-dotslash/action.yml new file mode 100644 index 0000000000..75ca0ccbe2 --- /dev/null +++ b/.github/actions/install-dotslash/action.yml @@ -0,0 +1,26 @@ +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: | + if [[ "$RUNNER_OS" == "Windows" ]]; then + wget 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 + exit 1 + elif [[ "$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 + exit 1 + 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 + mv dotslash /usr/local/bin/dotslash + fi diff --git a/.github/workflows/build-buck2.yml b/.github/workflows/build-buck2.yml new file mode 100644 index 0000000000..e35adadd0f --- /dev/null +++ b/.github/workflows/build-buck2.yml @@ -0,0 +1,34 @@ +name: buck2 + +on: + push: + branches: + - main + pull_request: + +permissions: read-all + +jobs: + nix: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + - os: windows-latest + 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: Install DotSlash + uses: ./.github/actions/install-dotslash + - name: Install Rust + uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 + with: + toolchain: 1.76 + - name: buck2 build //... + run: | + dotslash --version + dotslash ./tools/bin/buck2 --version