Skip to content

Commit

Permalink
Merge pull request tweag#158 from tweag/github-actions
Browse files Browse the repository at this point in the history
Migrate to GitHub actions & add MacOS pipeline
  • Loading branch information
mboes authored Mar 18, 2021
2 parents 6e0df3d + a854667 commit 6981f4b
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 8 deletions.
19 changes: 19 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions .buildkite/pipeline.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -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 <<EOF
common --config=ci
build --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY"
EOF
- name: Build & test
run: |
nix-shell --pure --run '
set -euo pipefail
bazel test //...
'
4 changes: 2 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pull_request_rules:
- name: automatic merge
conditions:
- "status-success~=buildkite/rules-nixpkgs(|/pr)"
- 'status-success~=Build & Test - Nixpkgs \(ubuntu\).*'
- 'status-success~=Build & Test - Nixpkgs \(macos\).*'
- "#approved-reviews-by>=1"
- "label=merge-queue"
- "base=master"
Expand All @@ -25,4 +26,3 @@ pull_request_rules:
label:
remove:
- "merge-queue"

8 changes: 7 additions & 1 deletion tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

0 comments on commit 6981f4b

Please sign in to comment.