Skip to content

Commit f2df43e

Browse files
committed
CI: test: mk some platform-specific setup declarative
`!= 'windows-latest` may mean not latest or not windows, but the setup is for Linux & macOS.
1 parent f3f426d commit f2df43e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/cache-deps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
6969
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
7070
71-
- if: matrix.os != 'windows-latest'
72-
name: Set some linux/macOS specific things
71+
- if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS')
72+
name: Set some Linux/macOS specific things
7373
run: |
7474
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
7575
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,15 @@ jobs:
8585
- run: ./fmt.sh
8686
name: "HLint via ./fmt.sh"
8787

88-
- if: matrix.os == 'windows-latest'
88+
- if: ${{ env.RUNNER_OS }} == 'Windows'
8989
name: Set some window specific things
9090
run: |
9191
echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV
9292
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
9393
94-
- if: matrix.os != 'windows-latest'
95-
name: Set some linux/macOS specific things
94+
95+
- if: (${{ env.RUNNER_OS }} == 'Linux') || (${{ env.RUNNER_OS}} == 'macOS')
96+
name: Set some Linux/macOS specific things
9697
run: |
9798
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
9899
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV

0 commit comments

Comments
 (0)