Skip to content

Commit

Permalink
Merge pull request #1833 from tweag/gh-action-pr-workflow
Browse files Browse the repository at this point in the history
Refine Continuous Integration workflow
  • Loading branch information
mergify[bot] authored Nov 23, 2022
2 parents 4a71029 + acafe6c commit 1bc0dd5
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Continuous integration
on: [push]
on:
push:
branches: master
pull_request:
branches: master
workflow_dispatch: # allows manual triggering
env:
# Bump this number to invalidate the GH actions cache
cache-version: 0
Expand Down Expand Up @@ -83,10 +88,15 @@ jobs:
# 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.
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
if [ -z "$BUILDBUDDY_API_KEY" ]; then
cache_setting='--noremote_upload_local_results'
else
cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY"
fi
cat >.bazelrc.local <<EOF
common --config=ci
build --config=linux-nixpkgs
build --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY"
build $cache_setting
EOF
ln -sr .bazelrc.local examples/arm/.bazelrc.local
cat >~/.netrc <<EOF
Expand Down Expand Up @@ -141,10 +151,15 @@ jobs:
Linux) BUILD_CONFIG=ci-linux-bindist;;
Windows) BUILD_CONFIG=ci-windows-bindist;;
esac
if [ -z "$BUILDBUDDY_API_KEY" ]; then
cache_setting='--noremote_upload_local_results'
else
cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY"
fi
cat >.bazelrc.local <<EOF
common --config=ci
build --config=$BUILD_CONFIG
build --remote_header=x-buildbuddy-api-key="$BUILDBUDDY_API_KEY"
build $cache_setting
EOF
cat >~/.netrc <<EOF
machine api.github.com
Expand Down

0 comments on commit 1bc0dd5

Please # to comment.