diff --git a/.bazelrc b/.bazelrc index 687c13626..035d9bfa6 100644 --- a/.bazelrc +++ b/.bazelrc @@ -5,3 +5,22 @@ build --crosstool_top=@nixpkgs_config_cc//:toolchain # resolved before `--incompatible_enable_cc_toolchain_resolution` can be # recommended for `nixpkgs_cc_configure_hermetic`. # build --incompatible_enable_cc_toolchain_resolution + +# CI Configuration +# ---------------- +common:ci --color=no +build:ci --verbose_failures +test:ci --test_output=errors + +# Use a remote cache during CI +build:ci --bes_results_url=https://app.buildbuddy.io/invocation/ +build:ci --bes_backend=grpcs://cloud.buildbuddy.io +build:ci --remote_cache=grpcs://cloud.buildbuddy.io +build:ci --remote_timeout=3600 +# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`. +# See https://github.com/tweag/rules_haskell/issues/1498. +build:ci --keep_backend_build_event_connections_alive=false + +# User Configuration +# ------------------ +try-import %workspace%/.bazelrc.local diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index d104ca7df..000000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,5 +0,0 @@ -steps: - - label: "Run tests" - command: | - nix-shell --pure --run 'bazel test --test_output errors //...' - timeout: 100 diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml new file mode 100644 index 000000000..a5aa4bd08 --- /dev/null +++ b/.github/workflows/workflow.yaml @@ -0,0 +1,29 @@ +name: Continuous integration +on: [push] +jobs: + test-nixpkgs: + name: Build & Test - Nixpkgs + strategy: + fail-fast: false + matrix: + os: [ubuntu, macos] + runs-on: ${{ matrix.os }}-latest + steps: + - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v12 + with: + nix_path: nixpkgs=./nixpkgs.nix + - name: Configure + env: + BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} + run: | + cat >.bazelrc.local <=1" - "label=merge-queue" - "base=master" @@ -25,4 +26,3 @@ pull_request_rules: label: remove: - "merge-queue" - diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 6c80584fd..30210a829 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -128,7 +128,13 @@ sh_test( data = [ "//nixpkgs:srcs", "//tests/invalid_nixpkgs_package:srcs", - "@busybox_static//:bin", "@nix-unstable//:bin", + ] + select({ + "@platforms//os:linux": ["@busybox_static//:bin"], + "//conditions:default": [], + }), + target_compatible_with = [ + # busybox_static is not available on MacOS. + "@platforms//os:linux", ], )