From 6d7190810dad4e76675e5e384c8803293bc3e8dd Mon Sep 17 00:00:00 2001 From: Fendor Date: Wed, 8 May 2024 17:20:52 +0200 Subject: [PATCH 1/4] Split out packaging action --- .github/workflows/package.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 10 ---------- 2 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/package.yml diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 00000000..d2e33ffe --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + ## make sure this corresponds with the version in release.yml + node-version: latest + + + - run: yarn install --immutable --immutable-cache --check-cache + + - name: Package extension + run: npx vsce package + - name: Upload extension vsix to workflow artifacts + uses: actions/upload-artifact@v3 + with: + name: haskell-${{ github.sha }}.vsix + path: haskell-*.vsix diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9a1fb7e..7deac546 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,13 +76,3 @@ jobs: rm -rf test-workspace rm -rf out shell: bash - - - name: Package tested extension - if: runner.os == 'Linux' - run: npx vsce package - - name: Upload extension vsix to workflow artifacts - if: runner.os == 'Linux' - uses: actions/upload-artifact@v3 - with: - name: haskell-${{ github.sha }}.vsix - path: haskell-*.vsix From 87252772129774a9f136b562b34cacb940c34ffc Mon Sep 17 00:00:00 2001 From: Fendor Date: Thu, 9 May 2024 11:26:48 +0200 Subject: [PATCH 2/4] Use Haskell Actions to setup ghcup on all platforms --- .github/workflows/test.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7deac546..78573910 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - ghc: [8.10.7, 9.0.2, 9.2.8, 9.4.7, 9.6.2] + ghc: [8.10.7, 9.4.7, 9.6.2, 9.8.2] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -28,6 +28,11 @@ jobs: - run: yarn install --immutable --immutable-cache --check-cache - run: yarn run webpack + # Setup toolchains, install ghcup, install ghc, etc... + - name: Setup Haskell + uses: haskell-actions/setup@v2 + with: + ghc-version: ${{ matrix.ghc }} - name: Toolchain settings run: | ghcup upgrade -i -f @@ -37,8 +42,8 @@ jobs: ghcup install stack latest ghcup install cabal latest - ghcup install ghc ${{matrix.ghc}} - ghcup set ghc ${{matrix.ghc}} + ghcup install ghc ${{ matrix.ghc }} + ghcup set ghc ${{ matrix.ghc }} ghcup install hls 2.2.0.0 ghcup install hls latest From 1179575c4fdeed7d17417b5a866033d815e6254c Mon Sep 17 00:00:00 2001 From: Fendor Date: Thu, 9 May 2024 11:39:17 +0200 Subject: [PATCH 3/4] Update GHC versions in the CI --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78573910..fa9dca1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - ghc: [8.10.7, 9.4.7, 9.6.2, 9.8.2] + ghc: [8.10.7, 9.4.8, 9.6.4, 9.8.2] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -45,6 +45,9 @@ jobs: ghcup install ghc ${{ matrix.ghc }} ghcup set ghc ${{ matrix.ghc }} + # This is a prefetched, fallback HLS version. + # We want to make sure, we still support old GHC versions + # and graciously fallback to an HLS version that supports the old GHC version, such as 8.10.7 ghcup install hls 2.2.0.0 ghcup install hls latest shell: bash From 09683e1a279a1365b6507d8071dbca6a9796a4fc Mon Sep 17 00:00:00 2001 From: Fendor Date: Thu, 9 May 2024 12:03:49 +0200 Subject: [PATCH 4/4] Downgrade macos image --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa9dca1b..46f0950a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-12, ubuntu-latest, windows-latest] ghc: [8.10.7, 9.4.8, 9.6.4, 9.8.2] runs-on: ${{ matrix.os }} steps: