From 8a813471f519b8bd3e8afbc9e8ce5e7d7dc9aa8f Mon Sep 17 00:00:00 2001 From: Chuck Grindel Date: Mon, 31 Jan 2022 11:49:22 -0700 Subject: [PATCH] Added scheduled builds and updated to install Swift and use simpler Swift Bazel config for Linux. (#114) --- .github/workflows/ci.yml | 31 +++++++++++++++++++++---------- README.md | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a0e520f..a7f83ce5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,9 @@ name: CI for PR Merge on: pull_request: branches: [ main ] + schedule: + # Every day at 11:14 UTC. + - cron: '14 11 * * *' jobs: @@ -24,21 +27,29 @@ jobs: env: CC: clang steps: + - uses: cgrindel/gha_install_swift_on_ubuntu@v1 + with: + swift_release_tag: "swift-5.5.2-RELEASE" + ubuntu_version: "20.04" - uses: actions/checkout@v2 - - name: Bazel Config for Linux + - name: Update local.bazelrc with Linux Flags shell: bash run: | - # Make sure that the Swift bin directory is first in the PATH. This addresses - # the `invalid linker name in argument '-fuse-ld=gold'` error when running - # SPM. In short, it allows SPM to find the correct linker. - swift_exec=$(which swift) - real_swift_exec=$(realpath $swift_exec) - real_swift_dir=$(dirname $real_swift_exec) - new_path="${real_swift_dir}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - cat >>local.bazelrc <> "local.bazelrc" <