Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fixes #1939

Merged
merged 5 commits into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions .github/workflows/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,28 @@ jobs:
- name: Create matrix
id: set-matrix
run: |
if "${{ github.event_name == 'schedule' }}" == "true"; then
MATRIX="$(jq -c '.' <<EOF
{
"ghc": ["9.6.4", "9.8.1"],
"cabal": ["3.10"],
"os": ["ubuntu-20.04", "ubuntu-22.04"],
"use-freeze-file": ["false"],
"include": [
{
"ghc": "9.6.4",
"cabal": "3.10",
"os" : "ubuntu-20.04",
"use-freeze-file": "true"
}
"use-freeze-file": ["false"]
]
}
EOF
)"
else
MATRIX="$(jq -c '.' <<EOF
{
"ghc": ["9.6.4"],
"cabal": ["3.10"],
"os": ["ubuntu-20.04", "ubuntu-22.04"],
"use-freeze-file": ["true"]
}
EOF
)"
fi
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
- name: Log config
run: |
Expand Down Expand Up @@ -292,21 +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: |
~/.cabal/packages
~/.cabal/store
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
Expand All @@ -331,7 +330,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
Expand Down Expand Up @@ -618,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"
Expand Down
Loading