Skip to content

Commit

Permalink
Merge branch 'master' into lars/split-slowtests
Browse files Browse the repository at this point in the history
  • Loading branch information
larskuhtz committed Sep 20, 2024
2 parents f7deecb + 3fa69e8 commit eaf7d03
Show file tree
Hide file tree
Showing 22 changed files with 358 additions and 586 deletions.
48 changes: 36 additions & 12 deletions .github/workflows/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,36 @@ jobs:
if "${{ github.event_name == 'schedule' }}" == "true"; then
MATRIX="$(jq -c '.' <<EOF
{
"ghc": ["9.6.5", "9.8.1"],
"cabal": ["3.10"],
"ghc": ["9.6.6", "9.8.2", "9.10.1"],
"cabal": ["3.12"],
"os": ["ubuntu-20.04", "ubuntu-22.04"],
"use-freeze-file": ["false"]
"use-freeze-file": ["false"],
"include" : [
{
"ghc": "9.8.2",
"cabal": "3.12",
"os": "ubuntu-22.04",
"use-freeze-file": "true"
}
]
}
EOF
)"
else
MATRIX="$(jq -c '.' <<EOF
{
"ghc": ["9.6.5"],
"cabal": ["3.10"],
"os": ["ubuntu-20.04", "ubuntu-22.04"],
"use-freeze-file": ["true"]
"ghc": ["9.6.6", "9.8.2", "9.10.1"],
"cabal": ["3.12"],
"os": ["ubuntu-22.04"],
"use-freeze-file": ["false"],
"include" : [
{
"ghc": "9.8.2",
"cabal": "3.12",
"os": "ubuntu-22.04",
"use-freeze-file": "true"
}
]
}
EOF
)"
Expand Down Expand Up @@ -235,12 +250,16 @@ jobs:
if: startsWith(matrix.os, 'ubuntu-')
run: sudo chown -R $USER /usr/local/.ghcup
- name: Install GHC and Cabal
id: setup
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Confirm GHC and Cabal installation
run: |
echo "setup ghc-version: ${{ steps.setup.outputs.ghc-version }}"
echo "setup cabal-version: ${{ steps.setup.outputs.cabal-version }}"
echo "setup cabal-store: ${{ steps.setup.outputs.cabal-store }}"
ghc --version
cabal --version
- name: Install non-Haskell dependencies (ubuntu)
Expand Down Expand Up @@ -326,11 +345,12 @@ jobs:
diff -w <(git show HEAD:cabal.project.freeze) cabal.project.freeze || true
- name: Sync from cabal cache
if: env.USE_CABAL_CACHE == 'true'
uses: larskuhtz/cabal-cache-action@a0f263d898dd246217960262caa1d381cf066e9a
uses: larskuhtz/cabal-cache-action@4b537195b33898fcd9adc62cee2a44986fd7b1b6
with:
bucket: "kadena-cabal-cache"
region: "us-east-1"
folder: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}"
folder: "packages/${{ matrix.os }}"
store_path: ${{ steps.setup.outputs.cabal-store }}
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 @@ -696,9 +716,12 @@ jobs:
# when adding more than one build, use a different package name or
# different tags
include:
- ghc: "9.6.5"
os: "ubuntu-20.04"
- ghc: "9.8.2"
os: "ubuntu-22.04"
use-freeze-file: "true"
- ghc: "9.10.1"
os: "ubuntu-22.04"
use-freeze-file: "false"
env:
OS: ${{ matrix.os }}
ARTIFACTS_NAME: chainweb-applications.${{ matrix.use-freeze-file }}.${{ matrix.ghc }}.${{ matrix.os }}
Expand All @@ -715,6 +738,7 @@ jobs:
run: |
tar -xzf "$ARTIFACTS_ARCHIVE"
# ubuntu-22.04 only include libssl3. ubuntu-20.04 uses libssl1.1
- name: Create Dockerfile
run: |
cat > Dockerfile <<DEOF
Expand All @@ -732,7 +756,7 @@ jobs:
apt-get install -y \
ca-certificates \
libgmp10 \
libssl1.1 \
libssl3 \
libsnappy1v5 \
zlib1g \
liblz4-1 \
Expand Down
48 changes: 30 additions & 18 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ on:

jobs:

# Note that cabal-cache-action only support arm64 for macos
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ["9.6.5"]
cabal: ["3.10"]
os: ["macos-14-large"]
ghc: ["9.8.2"]
cabal: ["3.12"]
os: ["macos-latest"]
cabalcache: ["true"]

steps:
Expand All @@ -28,7 +29,7 @@ jobs:
name: Restore ghc & cabal binaries cache
id: ghc-cabal-cache
env:
key: ${{ runner.os }}-ghc-cabal
key: ${{ runner.os }}-${{ runner.arch }}-ghc-cabal
with:
path: |
/Users/runner/.ghcup
Expand All @@ -38,22 +39,30 @@ jobs:
- uses: actions/cache/restore@v4
name: Restore dist-newstyle cache
id: cabal-dist-cache
env:
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.ghc }}-dist
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }}
key: ${{ env.key }}-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**', 'bench/**', 'tools/**') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.ghc }}-
${{ env.key }}
- name: Install GHC and Cabal
id: setup
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Confirm GHC and Cabal installation
run: |
echo "setup ghc-version: ${{ steps.setup.outputs.ghc-version }}"
echo "setup cabal-version: ${{ steps.setup.outputs.cabal-version }}"
echo "setup cabal-store: ${{ steps.setup.outputs.cabal-store }}"
ghc --version
cabal --version
ghc --version
cabal --version
Expand All @@ -80,15 +89,6 @@ jobs:
package pact
documentation: False
EOF
- uses: actions/cache/save@v4
name: Save dist-newstyle cache
if: steps.cabal-dist-cache.outputs.cache-hit != 'true'
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ steps.cabal-dist-cache.outputs.cache-primary-key }}
# Build
- name: Delete freeze file if it exists
Expand All @@ -103,11 +103,12 @@ jobs:
cabal freeze
- name: Sync from cabal cache
if: matrix.cabalcache == 'true'
uses: larskuhtz/cabal-cache-action@018b7ae0c480ba3dc4fa0cfa3a0bc1f05b7724b3
uses: larskuhtz/cabal-cache-action@4b537195b33898fcd9adc62cee2a44986fd7b1b6
with:
bucket: "kadena-cabal-cache"
region: "us-east-1"
folder: "${{ matrix.os }}"
folder: "packages/${{ matrix.os }}"
store_path: ${{ steps.setup.outputs.cabal-store }}
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 All @@ -126,10 +127,20 @@ jobs:
exe:cwtool \
chainweb:bench:bench
- uses: actions/cache/save@v4
name: Save dist-newstyle cache
if: steps.cabal-dist-cache.outputs.cache-hit != 'true'
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ steps.cabal-dist-cache.outputs.cache-primary-key }}

- name: Run unit tests
run: |
ulimit -n 10000
$(cabal list-bin chainweb:test:chainweb-tests) --hide-successes
$(cabal list-bin chainweb:test:chainweb-tests) --hide-successes -p '!/chainweb216Test/'
# Checks
- name: Check that working directory tree is clean
Expand All @@ -151,3 +162,4 @@ jobs:
exit 1
fi
mv cabal.project.freeze.backup cabal.project.freeze
30 changes: 15 additions & 15 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ source-repository-package
--sha256: 19pjy06xrx2siggzybcmly0qaq4ds3yzxcsvqwgs4qh9kkzh0kqh

source-repository-package
type: git
location: https://github.com/kadena-io/kadena-ethereum-bridge.git
tag: 3837c4c81f1beaffc1d52375e61576366d49170a
--sha256: 1knhscph2g3saz0pjd1d5a32mr281msapccfrillgd2qk4pj7xjc
type: git
location: https://github.com/kadena-io/kadena-ethereum-bridge.git
tag: 3837c4c81f1beaffc1d52375e61576366d49170a
--sha256: 1knhscph2g3saz0pjd1d5a32mr281msapccfrillgd2qk4pj7xjc

source-repository-package
type: git
Expand All @@ -123,19 +123,20 @@ source-repository-package
tag: d8019c3404d6f3b3c0b0416e9899cfdf614ef425
--sha256: 09msayidg23rsdz97fcfqqalm4pbawx3c1qihgab8hnlmjxby103

-- Patch merged into master (upcoming version 10.0). We are currently using 9.2
-- Patch merged into master (upcoming verison 10.0). We are currently using 9.2.
-- This fork contains additional fixes for using 9.2 with recent compilers.
source-repository-package
type: git
location: https://github.com/larskuhtz/sbv
tag: b66e3a04c20f753213fe7e5115a95b3fe34109f9
--sha256: 0dca5pl56nz8ijnqavnpxw5f47qmpalszd5w0ag8bq3fd0l3839m
tag: 1f2d042718fcf9a140398bd3dedac77c207cce27
--sha256: 0l3nhsdxsyx17i29dw691d6bbqz26af6lg6pi1c2kb34v59m2rk3

-- Required for non-canonical decode in base64-bytestring (remove after 2.20 fork)
source-repository-package
type: git
location: https://github.com/emilypi/base64-bytestring-kadena
tag: 174af3523616c8fe01449da5ccbb9f16df097ac3
--sha256: sha256-kVFIy+Aj3TNJpsM1Cs/5uGmzeWwHKYWjjCQ+L1/XOj8=
--sha256: 0grssxgjygi4ijiqaa87diwv6sdqz77hldf3lr4k7p93w35lhlci

-- -------------------------------------------------------------------------- --
-- Relaxed Bounds
Expand Down Expand Up @@ -196,12 +197,11 @@ allow-newer: regex-base:*
allow-newer: regex-tdfa:*
allow-newer: base-compat-batteries:*

-- -------------------------------------------------------------------------- --
-- Upper Bounds
-- webauthn also uses overly restrictive upper bounds
allow-newer: webauthn:*

allow-newer: webauthn:these
allow-newer: webauthn:time
allow-newer: webauthn:aeson
-- many packages use an spurious <1.5 upper bound on hashable
allow-newer: *:hashable

-- Hashable 1.4.5 changes the hashing of bytestring, which causes some issues.
constraints: hashable < 1.4.5
-- -------------------------------------------------------------------------- --
-- Upper Bounds
Loading

0 comments on commit eaf7d03

Please sign in to comment.