Skip to content

Commit

Permalink
Remove dist-newstyle -> dist hack that is no longer needed because we…
Browse files Browse the repository at this point in the history
… have moved to ghc-8.10.2. The hack was necessary because ghc-8.6.5 suffered MAX_PATH issues for haskell source code.
  • Loading branch information
newhoggy authored and coot committed May 13, 2021
1 parent 3257d67 commit cdd8aaa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/github-page.yml
Expand Up @@ -19,13 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Select build directory
run: |
CABAL_BUILDDIR=dist
echo "CABAL_BUILDDIR=$CABAL_BUILDDIR"
echo "CABAL_BUILDDIR=$CABAL_BUILDDIR" >> $GITHUB_ENV
- name: Set cache version
run: echo "CACHE_VERSION=UN37rUo" >> $GITHUB_ENV

Expand Down Expand Up @@ -63,7 +56,7 @@ jobs:
mv cabal.project.tmp cabal.project
- name: Cabal Configure
run: cabal configure --builddir="$CABAL_BUILDDIR" --write-ghc-environment-files=always
run: cabal configure --write-ghc-environment-files=always

- name: Use cabal.project.local.github-pages
run: |
Expand All @@ -84,12 +77,12 @@ jobs:
cache-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-
- name: Install dependencies
run: cabal build all --builddir="$CABAL_BUILDDIR" --only-dependencies
run: cabal build all --only-dependencies

- name: Build Haddock documentation 🔧
run: |
mkdir ./haddocks
./scripts/haddocs.sh ./haddocks true "$CABAL_BUILDDIR"
./scripts/haddocs.sh ./haddocks true
- name: Upload documentation
uses: actions/upload-artifact@v2
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/haskell.yml
Expand Up @@ -30,13 +30,6 @@ jobs:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ env.CABAL_VERSION }}

- name: Select build directory
run: |
CABAL_BUILDDIR=dist
echo "CABAL_BUILDDIR=$CABAL_BUILDDIR"
echo "CABAL_BUILDDIR=$CABAL_BUILDDIR" >> $GITHUB_ENV
- name: Set cache version
run: echo "CACHE_VERSION=grFfw8r" >> $GITHUB_ENV

Expand Down Expand Up @@ -112,7 +105,7 @@ jobs:
mv cabal.project.tmp cabal.project
- name: Cabal Configure
run: retry 2 cabal configure --builddir="$CABAL_BUILDDIR" --enable-tests --enable-benchmarks --write-ghc-environment-files=always
run: retry 2 cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=always

- name: Record dependencies
run: |
Expand All @@ -128,25 +121,31 @@ jobs:
cache-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-
- name: Install dependencies
run: retry 2 cabal build all --builddir="$CABAL_BUILDDIR" --only-dependencies
run: retry 2 cabal build all --only-dependencies

- name: Build
run: retry 2 cabal build cardano-node cardano-cli cardano-node-chairman --builddir="$CABAL_BUILDDIR"
run: retry 2 cabal build cardano-node cardano-cli cardano-node-chairman

- name: Git clone
run: git clone https://github.com/input-output-hk/cardano-mainnet-mirror

- name: Run tests
run: TMPDIR="${{ runner.temp }}" TMP="${{ runner.temp }}" KEEP_WORKSPACE=1 retry 2 cabal test --builddir="$CABAL_BUILDDIR" cardano-node-chairman
run: TMPDIR="${{ runner.temp }}" TMP="${{ runner.temp }}" KEEP_WORKSPACE=1 retry 2 cabal test cardano-node-chairman

- name: Build & Test
run: |
mkdir -p artifacts
for exe in $(cat dist-newstyle/cache/plan.json | jq -r '."install-plan"[] | select(.style == "local" and (."component-name" | startswith("exe:"))) | ."bin-file"'); do
( cd artifacts
tar -C "$(dirname $exe)" -czf "$(basename $exe).tar.gz" "$(basename $exe)"
)
if [ -f $exe ]; then
echo "Including artifact $exe"
( cd artifacts
tar -C "$(dirname $exe)" -czf "$(basename $exe).tar.gz" "$(basename $exe)"
)
else
echo "Skipping artifact $exe"
fi
done
- name: Save Artifact
Expand Down

0 comments on commit cdd8aaa

Please sign in to comment.