From ee64dc4d4562b9a66b56de4e9eed737a5bb6aa1f Mon Sep 17 00:00:00 2001 From: Paul Burns Date: Fri, 14 Jun 2024 14:00:25 -0400 Subject: [PATCH] Updates to workflow and build scripts Updates actions in github workflow to remove deprecation warnings about Node 16. Updates build-lib script so that CI will fail the build if stack attempts to write a new lock file. --- .github/workflows/main.yml | 4 ++-- scripts/build-lib | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b99760..bea892f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-version: v3 with: diff --git a/scripts/build-lib b/scripts/build-lib index 3c8a47e..1027214 100755 --- a/scripts/build-lib +++ b/scripts/build-lib @@ -4,4 +4,16 @@ set -e source scripts/lib/run-in-container.sh -stack build --fast --test "$@" +STACK_OPTIONS="" + +if [ "$CI" ]; then + STACK_OPTIONS="--lock-file error-on-write" +else + STACK_OPTIONS="--fast" +fi + +stack \ + build \ + --test \ + $STACK_OPTIONS \ + "$@"