From db6efa22a6b2a57786f5c40fa5f55fe96e506447 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Thu, 18 Jul 2024 00:17:44 +0000 Subject: [PATCH] [glean][arm][oss][gh] Use an arm image when using arm runners Otherwise we would fail trying to set up docker on a bare arm linux runner. Notes: - this runs directly on the provided runner (not a docker image, nesting) - passwordless sudo --- .github/workflows/ci-aarch64.yml | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-aarch64.yml b/.github/workflows/ci-aarch64.yml index 147cf06d5..a4ae19c3a 100644 --- a/.github/workflows/ci-aarch64.yml +++ b/.github/workflows/ci-aarch64.yml @@ -1,6 +1,6 @@ # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions name: CI-ARM -on: [push] +on: [push, pull_request] env: LANG: en_US.UTF-8 @@ -13,23 +13,22 @@ jobs: matrix: ghc: [8.10.7] compiler: [clang] + runs-on: 4-core-ubuntu-arm - container: - image: ubuntu:22.04 steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Initialize APT run: | - apt-get update - apt-get install -y curl + sudo apt-get update + sudo apt-get install -y curl - name: Setup en_US.UTF-8 locale run: | - apt-get install -y locales - locale-gen en_US.UTF-8 - update-locale LANG=en_US.UTF-8 + sudo apt-get install -y locales + sudo locale-gen en_US.UTF-8 + sudo update-locale LANG=en_US.UTF-8 - name: Setup LOCAL_BIN environment run: | @@ -41,29 +40,18 @@ jobs: echo "MAKEFLAGS=-j$(nproc)" >> "$GITHUB_ENV" echo "EXTRA_GHC_OPTS=-j$(nproc) +RTS -A128m -n2m -RTS" >> "$GITHUB_ENV" - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install indexer (flow) - run: npm install -g flow-bin - - - name: Install indexer (typescript) - run: npm install -g @sourcegraph/scip-typescript - - name: Setup Haskell run: | curl --proto '=https' --tlsv1.2 -sSf "https://downloads.haskell.org/~ghcup/aarch64-linux-ghcup" -o "$LOCAL_BIN"/ghcup chmod +x "$LOCAL_BIN"/ghcup ghcup install cabal --set - apt-get install -y build-essential libgmp-dev libnuma-dev + sudo apt-get install -y build-essential libgmp-dev libnuma-dev ghcup install ghc ${{ matrix.ghc }} --set echo "$HOME/.ghcup/bin" >> "$GITHUB_PATH" # This needs to be before the Clang step since they install GCC. We want to remove GCC if Clang is enabled. - name: Install CMake and Boost - run : apt-get install -y cmake libboost-all-dev + run : sudo apt-get install -y cmake libboost-all-dev - name: Setup Clang run: |