From 36dc67837f6a23a02e64e0e5ce50dca02465049b Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Tue, 14 May 2024 15:21:46 -0400 Subject: [PATCH 1/5] put freeze file status into cabal cache key Change-Id: I2d018d6c8e1261f001998315a0e1581ef346908e --- .github/workflows/applications.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index 7b72c83313..b49594b8ec 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -331,7 +331,7 @@ jobs: with: bucket: "kadena-cabal-cache" region: "us-east-1" - folder: "${{ matrix.os }}-${{ matrix.ghc }}" + folder: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}" aws_access_key_id: "${{ secrets.kadena_cabal_cache_aws_access_key_id }}" aws_secret_access_key: "${{ secrets.kadena_cabal_cache_aws_secret_access_key }}" - name: Install build dependencies From b5cc4b5d93f2efd79d83fef26795f0e26f2b85eb Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Tue, 14 May 2024 14:42:26 -0500 Subject: [PATCH 2/5] github: split out non-freeze file builds to schedule Change-Id: I38160143d29b764fe83d76b54d1f8cfc0c8bc89e --- .github/workflows/applications.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index b49594b8ec..afe6a07865 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -131,23 +131,28 @@ jobs: - name: Create matrix id: set-matrix run: | + if "${{ github.event_name == 'schedule' }}" == "true"; then MATRIX="$(jq -c '.' <> $GITHUB_OUTPUT - name: Log config run: | From ab5dd5e9b07eb0d837f4d4171afc5da56f71edcf Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Wed, 15 May 2024 10:02:25 -0400 Subject: [PATCH 3/5] Stop caching ~/.cabal with dist-newstyle Change-Id: Iec704b05216fbefe9d2bb491bf55b7612b4c66eb --- .github/workflows/applications.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index afe6a07865..cc22e54f2b 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -305,8 +305,6 @@ jobs: name: Cache dist-newstyle with: path: | - ~/.cabal/packages - ~/.cabal/store dist-newstyle key: ${{ matrix.os }}-${{ matrix.ghc }}-2-${{ steps.cache-date.outputs.value }}-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }} restore-keys: | From 1a37b48fc6d04dc025d735ae4ecab0dacf03ee2c Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Wed, 15 May 2024 10:13:54 -0400 Subject: [PATCH 4/5] Put freeze file usage into github cache key, remove date Change-Id: Ia364e80a36f4d83d56ced4c365cd48080c9d348a --- .github/workflows/applications.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index cc22e54f2b..737d0686ab 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -297,19 +297,15 @@ jobs: # dist cache # the cache-key forces uploading of cache at least once a day, which ensures that # upstream dependency changes are captured regularly. - - name: Create date file for dist-newstyle cache key - id: cache-date - run: | - echo "value=$(date +%Y.%j)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 name: Cache dist-newstyle with: path: | dist-newstyle - key: ${{ matrix.os }}-${{ matrix.ghc }}-2-${{ steps.cache-date.outputs.value }}-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }} + key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}-2-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }} restore-keys: | - ${{ matrix.os }}-${{ matrix.ghc }}-2-${{ steps.cache-date.outputs.value }}- - ${{ matrix.os }}-${{ matrix.ghc }}-2- + ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}-2- + ${{ matrix.os }}-${{ matrix.ghc }}- # Build - name: Delete Freeze file if it exists From 9807b322ad5f5d7dcd5ee7db1a1de00e0d67b7a3 Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Wed, 15 May 2024 10:52:25 -0400 Subject: [PATCH 5/5] Disable docker upload for non-freeze-file build Change-Id: I18e53d828ebc38ae7d31853058caf8099a7ddbe6 --- .github/workflows/applications.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index 737d0686ab..2cb93550de 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -617,15 +617,13 @@ jobs: name: Build and publish docker image needs: [config, build] runs-on: ${{ matrix.os }} + if: "${{ github.event_name != 'schedule' }}" strategy: fail-fast: false matrix: # when adding more than one build, use a different package name or # different tags include: - - ghc: "9.6.4" - os: "ubuntu-20.04" - use-freeze-file: "false" - ghc: "9.6.4" os: "ubuntu-20.04" use-freeze-file: "true"