Skip to content

Commit

Permalink
update ci/cd actions to use v4 loader
Browse files Browse the repository at this point in the history
  • Loading branch information
dorchard committed Sep 12, 2024
1 parent f49a12e commit 28d8c9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
name: Ubuntu / Stack / test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# relative paths are relative to the project directory
- name: Cache Stack build artifacts (user + project)
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.stack
Expand All @@ -41,7 +41,7 @@ jobs:
run: stack --no-terminal install

- name: Upload executable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: ~/.local/bin/${{ env.EXE_NAME }}
name: ${{ env.EXE_NAME }}-ubuntu-stack-${{ github.sha }}
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
# My issue on haskell/actions: https://github.com/haskell/actions/issues/41
# This also requires us to do a deep fetch, else we don't get the Git commit
# history we need to rewrite mod times.
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set all tracked file modification times to the time of their last commit
Expand All @@ -81,15 +81,15 @@ jobs:
- name: Setup Haskell build environment
id: setup-haskell-build-env
uses: haskell/actions/setup@v2
uses: haskell/actions/setup@v4
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- run: cabal freeze

- name: Cache Cabal build artifacts
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell-build-env.outputs.cabal-store }}
Expand All @@ -114,19 +114,19 @@ jobs:
steps:

# TODO figure out timestamp fixer on Mac (no Mac available to test)
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Haskell build environment
id: setup-haskell-build-env
uses: haskell/actions/setup@v2
uses: haskell/actions/setup@v4
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- run: cabal freeze

- name: Cache Cabal build artifacts
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell-build-env.outputs.cabal-store }}
Expand All @@ -143,10 +143,10 @@ jobs:
env:
HSPEC_OPTIONS: --color

# note that Cabal uses symlinks -- actions/upload-artifact@v2 apparently
# note that Cabal uses symlinks -- actions/upload-artifact@v4 apparently
# dereferences for us
- name: Upload executable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: ~/.cabal/bin/${{ env.EXE_NAME }}
name: ${{ env.EXE_NAME }}-macos-ghc-${{ matrix.ghc }}-cabal-${{ github.sha }}
Expand All @@ -162,19 +162,19 @@ jobs:
ghc: ["9.2"]
steps:
# TODO figure out timestamp fixer on Windows (need Bash)
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Haskell build environment
id: setup-haskell-build-env
uses: haskell/actions/setup@v2
uses: haskell/actions/setup@v4
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- run: cabal freeze

- name: Cache Cabal build artifacts
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell-build-env.outputs.cabal-store }}
Expand All @@ -192,7 +192,7 @@ jobs:
HSPEC_OPTIONS: --color

- name: Upload executable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: "C:/cabal/bin/${{ env.EXE_NAME }}.exe"
name: ${{ env.EXE_NAME }}-windows-ghc-${{ matrix.ghc }}-cabal-${{ github.sha }}.exe
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/disabled/hackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# My issue on haskell/actions: https://github.com/haskell/actions/issues/41
# This also requires us to do a deep fetch, else we don't get the Git commit
# history we need to rewrite mod times.
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set all tracked file modification times to the time of their last commit
Expand All @@ -56,7 +56,7 @@ jobs:
- run: cabal freeze

- name: Cache global Cabal store
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cabal/store
key: hackage-deps-${{ runner.os }}-ghc_${{ env.ghc }}
Expand All @@ -68,14 +68,14 @@ jobs:
- run: cabal sdist

- name: Upload Hackage sdist
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: dist-newstyle/sdist/${{ env.package_name }}-*.tar.gz
name: ${{ env.package_name }}-sdist-${{ github.sha }}.tar.gz
if-no-files-found: error

- name: Upload Hackage Haddock docs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: dist-newstyle/${{ env.package_name }}-*-docs.tar.gz
name: ${{ env.package_name }}-hackage-haddocks-${{ github.sha }}.tar.gz
Expand Down

0 comments on commit 28d8c9e

Please sign in to comment.