Skip to content

Commit

Permalink
DEBUG run dep-narrowing-th:Test -- #2073
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Dec 13, 2023
1 parent 652db49 commit 2fbddd7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 84 deletions.
92 changes: 10 additions & 82 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Continuous integration
on:
push:
branches: master
pull_request:
branches: master
workflow_dispatch: # allows manual triggering
schedule:
- cron: '1 11 * * *'
env:
# Bump this number to invalidate the GH actions cache
cache-version: 0
Expand All @@ -16,49 +11,16 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
lint:
name: Format & Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tweag/configure-bazel-remote-cache-auth@v0
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
bazelrc_path: .bazelrc.auth
- uses: ./.github/actions/set_tcp_keepalive_time
- uses: ./.github/actions/authenticate_github_api
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure
run: |
cat >>.bazelrc.local <<EOF
common --config=ci
EOF
- run: |
bazelisk test buildifier:buildifier_test
test-nixpkgs:
name: Build & Test - Nixpkgs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11]
module: [rules_haskell, rules_haskell_nix, rules_haskell_tests]
bzlmod: [true, false]
os: [macos-11, macos-latest]
module: [rules_haskell_tests]
bzlmod: [false]
ghc:
- 9.2.8
- 9.4.6
- 9.6.2
exclude:
- module: rules_haskell_nix

bzlmod: false
# TODO: in a MODULE.bazel file we declare version specific dependencies, would need to use stack snapshot json
# and stack config per GHC version
- ghc: 9.4.6
bzlmod: true
- ghc: 9.6.2
bzlmod: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -121,49 +83,32 @@ jobs:
nix-shell --arg docTools false --argstr ghcVersion ${{ matrix.ghc }} --pure --run '
set -euo pipefail
cd rules_haskell_tests
# XXX run start script `--with-bzlmod=true` when supported
if ! ${{ matrix.bzlmod }}; then
./tests/run-start-script.sh --use-nix --with-bzlmod=${{ matrix.bzlmod }}
fi
bazel build //tests:run-tests
./bazel-ci-bin/tests/run-tests
bazel coverage //...
'
test-bindist:
name: Build & Test - bindist
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
module: [rules_haskell, rules_haskell_tests]
bzlmod: [true, false]
os: [macos-11, macos-latest]
module: [rules_haskell_tests]
bzlmod: [false]
ghc:
- 9.2.8
- 9.4.6
- 9.6.2
exclude:
# TODO: in a MODULE.bazel file we declare version specific dependencies, would need to use stack snapshot json
# and stack config per GHC version
- ghc: 9.4.6
bzlmod: true
- ghc: 9.6.2
bzlmod: true
# currently proto-lens-protoc fails with an access violation on Windows
- ghc: 9.6.2
os: windows-latest
env:
# prevent auto-detection of system compilers on Windows
BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN: ${{ matrix.os == 'windows-latest' && 1 || 0 }}
# do not use Xcode on macOS
BAZEL_USE_CPP_ONLY_TOOLCHAIN: ${{ matrix.os == 'macos-11' && 1 || 0 }}
BAZEL_USE_CPP_ONLY_TOOLCHAIN: 1
GHC_VERSION: ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/free_disk_space_on_linux
- uses: ./.github/actions/install_apt_pkgs
with:
with:
packages: libtinfo5
- name: Mount Bazel cache
uses: actions/cache@v3
Expand Down Expand Up @@ -226,13 +171,8 @@ jobs:
shell: bash
run: |
cd rules_haskell_tests
./tests/run-start-script.sh --use-bindists --with-bzlmod=${{ matrix.bzlmod }}
# Quote the package specifier so that it works on Windows
bazel test "//..."
# Test stack_snapshot pinning
# NOTE keep in sync with tests/RunTests.hs
bazel run @stackage-pinning-test-unpinned//:pin
bazel build @stackage-pinning-test//:hspec
bazel build //tests:run-tests
./bazel-ci-bin/tests/run-tests
- name: Collect Logs
id: collect_logs
Expand All @@ -254,15 +194,3 @@ jobs:
with:
name: Logs ${{ matrix.os }} ${{ matrix.module }} ${{ matrix.bzlmod }}
path: logs

all_ci_tests:
runs-on: ubuntu-latest
needs:
- lint
- test-nixpkgs
- test-bindist
if: ${{ always() }}
steps:
- uses: cgrindel/gha_join_jobs@794a2d117251f22607f1aab937d3fd3eaaf9a2f5 # v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ haskell_library(
tags = [
# skip building this target on macos with GHC 9.6.2 since it crashes ghc-iserv
# see https://github.com/tweag/rules_haskell/issues/2073
"dont_build_on_macos_with_ghc_9.6.2",
#"dont_build_on_macos_with_ghc_9.6.2",
],
deps = [
":NonModulesTestLib",
Expand All @@ -121,7 +121,7 @@ haskell_test(
tags = [
# skip testing this target on macos with GHC 9.6.2 since it crashes ghc-iserv
# see https://github.com/tweag/rules_haskell/issues/2073
"dont_build_on_macos_with_ghc_9.6.2",
#"dont_build_on_macos_with_ghc_9.6.2",
],
visibility = ["//visibility:public"],
deps = [
Expand Down

0 comments on commit 2fbddd7

Please sign in to comment.