Skip to content

Commit

Permalink
ci: more
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Oct 22, 2024
1 parent 37881bd commit 2c00fbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ env:
cabal: |
docker run \
--volume "${{ github.workspace }}":/mnt/ \
--volume "${HOME}/.cache/cabal":/root/.cache/cabal \
--volume "${HOME}/.cache/cabal/packages":/root/.cache/cabal/packages \
--volume "${HOME}/.cabal/store":/root/.local/state/cabal/store \
--volume "${{ github.workspace }}/dist-newstyle":/mnt/dist-newstyle \
ghcr.io/spex-lang/static-build:9.6.6 \
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
key: ${{ runner.os }}-ghc-${{ matrix.ghc-version }}-cabal-${{ matrix.cabal-version }}
with:
path: |
${HOME}/.cache/cabal
${HOME}/.cache/cabal/packages
${HOME}/.cabal/store
${{ github.workspace }}/dist-newstyle
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
Expand All @@ -135,19 +135,21 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
with:
path: |
${HOME}/.cache/cabal
${HOME}/.cache/cabal/packages
${HOME}/.cabal/store
${{ github.workspace }}/dist-newstyle
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: "Inspect cache: ~/.cache/cabal"
- name: "Inspect cache: ~/.cache/cabal/packages"
run: |
echo ${HOME}
ls -R "${HOME}/.cache/cabal" || true
echoh "${HOME}/.cache/cabal/packages"
du -sh "${HOME}/.cache/cabal/packages" || true
ls -R "${HOME}/.cache/cabal/packages" || true
- name: "Inspect cache: ~/.cabal/store"
run: |
echo ${HOME}
echo "${HOME}/.cabal/store"
du -sh "${HOME}/.cabal/store" || true
ls -R "${HOME}/.cabal/store" || true
- name: "Inspect cache: dist-newstyle"
Expand Down Expand Up @@ -179,7 +181,7 @@ jobs:
ls -R "${{github.workspace }}/dist-newstyle/build"
mkdir -p "${{ github.workspace }}/bin"
cp "$(find ${{ github.workspace }}/dist-newstyle \
\\( -name spex -o -name spex-demo-petstore \\) -type f -executable)" \
( -name spex -o -name spex-demo-petstore ) -type f -executable)" \
"${{ github.workspace }}/bin"
- name: Create new git tag, if merge to main and .cabal version is bumped
Expand Down
2 changes: 1 addition & 1 deletion release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static-build: build-image
cache/dist-newstyle-musl
docker run \
-v "${PWD}/..":/mnt/:ro \
-v "${PWD}/cache/cabal-cache-musl":/root/.cache/cabal \
-v "${PWD}/cache/cabal-cache-musl":/root/.cache/cabal/packages \
-v "${PWD}/cache/cabal-store-musl":/root/.local/state/cabal/store \
-v "${PWD}/cache/dist-newstyle-musl":/mnt/dist-newstyle \
ghcr.io/spex-lang/static-build:$(GHC_VERSION) \
Expand Down

0 comments on commit 2c00fbb

Please sign in to comment.