Skip to content

Update dependency bazel_features to v1.41.0 #455

Update dependency bazel_features to v1.41.0

Update dependency bazel_features to v1.41.0 #455

Workflow file for this run

name: Test patches
on:
push:
paths:
- 'haskell/ghc_bindist.bzl'
- 'haskell/private/ghc_bindist_generated.json'
- 'haskell/assets/**'
workflow_dispatch:
env:
# Bump this number to invalidate the GH actions cache
cache-version: 0
jobs:
find-ghc-version:
name: Find GHC versions for which a bindist is provided
runs-on: ubuntu-24.04
outputs:
ghc-matrix: ${{ steps.set-ghc-versions.outputs.ghc-matrix }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- id: set-ghc-versions
name: Extract from gen_ghc_bindist
run: python .github/extract_from_ghc_bindist.py
test-ghc-patches:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.ghc-version }}
cancel-in-progress: true
name: Test GHC patches
needs: find-ghc-version
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
ghc-version: ${{ fromJSON(needs.find-ghc-version.outputs.ghc-matrix) }}
exclude:
# older GHC versions require the LLVM backend on darwin-arm64,
# which does not work out of the box
- ghc-version: 8.10.7
os: macos-14
- ghc-version: 9.0.2
os: macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Mount Bazel cache
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: ~/repo-cache
key: repo-cache-${{ runner.os }}-bindist-${{ env.cache-version }}
- name: Configure
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
shell: bash
run: |
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`.
# See https://github.com/tweag/rules_haskell/issues/1498 and https://github.com/tweag/rules_haskell/pull/1692.
[[ ${{ runner.os }} == Linux ]] && sudo sysctl -w net.ipv4.tcp_keepalive_time=60
case ${{ runner.os }} in
macOS) BUILD_CONFIG=macos-bindist;;
Linux) BUILD_CONFIG=linux-bindist;;
Windows) BUILD_CONFIG=ci-windows-bindist;;
esac
cat >.bazelrc.local <<EOF
common --config=ci
build --config=$BUILD_CONFIG
build --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY"
EOF
cat >~/.netrc <<EOF
machine api.github.com
password ${{ secrets.GITHUB_TOKEN }}
EOF
- uses: ./.github/actions/install_apt_pkgs
with:
# some old ghc distributions require libnuma, see https://gitlab.haskell.org/ghc/ghc/-/issues/15688
packages: libnuma-dev
- name: Build & test
shell: bash
env:
GHC_VERSION: ${{ matrix.ghc-version }}
working-directory: rules_haskell_tests
run: ./tests/run-start-script.sh --use-bindists