From df067f9ae71f7997d9d23f339836e5beccebc408 Mon Sep 17 00:00:00 2001 From: Hendrik van Antwerpen Date: Mon, 31 Mar 2025 20:56:53 +0200 Subject: [PATCH 1/5] Add permissions and update actions versions --- .github/workflows/bazel.yml.disabled | 7 +++++-- .github/workflows/haskell.yml | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bazel.yml.disabled b/.github/workflows/bazel.yml.disabled index 05389979a5..228065913d 100644 --- a/.github/workflows/bazel.yml.disabled +++ b/.github/workflows/bazel.yml.disabled @@ -8,16 +8,19 @@ on: - master pull_request: {} +permissions: + contents: read + jobs: build: name: Bazel runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: caching-stage name: Cache Bazel artifacts with: diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index e42629b3be..be5f13146c 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -8,6 +8,9 @@ on: - master pull_request: +permissions: + contents: read + jobs: build: name: ghc ${{ matrix.ghc }} @@ -17,15 +20,15 @@ jobs: ghc: ["8.10", "9.2"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' - - uses: haskell/actions/setup@v1 + - uses: haskell-actions/setup@d9b5b3fcf7ca56b8fe585c9b77d3b0ce466affd2 # v2.7.10 name: Setup Haskell with: ghc-version: ${{ matrix.ghc }} - - uses: actions/cache@v1 + - uses: actions/cache@v4 id: cache-cabal name: Cache Cabal artifacts with: From 6581936492bdf311d7b7fdea7646c323f840d54c Mon Sep 17 00:00:00 2001 From: Hendrik van Antwerpen Date: Mon, 31 Mar 2025 21:02:45 +0200 Subject: [PATCH 2/5] Replace direct download of cabal-cache with installing via cabal --- .github/workflows/haskell.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index be5f13146c..023fb9b327 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -42,8 +42,7 @@ jobs: - name: Get cabal-cache run: | - curl -L https://github.com/haskell-works/cabal-cache/releases/download/v1.0.1.8/cabal-cache_x86_64_linux.tar.gz > ./cc.tar.gz - tar -xvf ./cc.tar.gz + cabal new-install cabal-cache - name: Configure project run: | @@ -52,7 +51,7 @@ jobs: cd semantic-source && cabal v2-configure --project-file=cabal.project.ci --disable-optimization --enable-tests --write-ghc-environment-files=always -j2 - name: Restore from cache - run: ./cabal-cache sync-from-archive --threads=2 --archive-uri=dist-cache || true + run: cabal-cache sync-from-archive --threads=2 --archive-uri=dist-cache || true - name: Build & test run: | @@ -73,4 +72,4 @@ jobs: cd semantic-source && cabal v2-run --project-file=cabal.project.ci semantic-source:test - name: Write out cache - run: ./cabal-cache sync-to-archive --threads=2 --archive-uri=dist-cache + run: cabal-cache sync-to-archive --threads=2 --archive-uri=dist-cache From fa7f4887223fe661481937e549e17da4d3a0b047 Mon Sep 17 00:00:00 2001 From: Hendrik van Antwerpen Date: Mon, 31 Mar 2025 21:09:00 +0200 Subject: [PATCH 3/5] Update codeowners --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index c010ba8c15..438d98c2db 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @github/semantic-code +* @github/blackbird-reviewers From febde1066de4cfcf3a7b7adf391804e92b3b7241 Mon Sep 17 00:00:00 2001 From: Hendrik van Antwerpen Date: Mon, 31 Mar 2025 21:20:46 +0200 Subject: [PATCH 4/5] Fix codeowners --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 438d98c2db..afc7ad42da 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @github/blackbird-reviewers +* @github/blackbird From aa7bca14e89aa030f3390da15b9edcc4854e3596 Mon Sep 17 00:00:00 2001 From: Hendrik van Antwerpen Date: Mon, 31 Mar 2025 21:21:17 +0200 Subject: [PATCH 5/5] Disable cache --- .github/workflows/haskell.yml | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 023fb9b327..bef36f0f87 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -28,21 +28,21 @@ jobs: with: ghc-version: ${{ matrix.ghc }} - - uses: actions/cache@v4 - id: cache-cabal - name: Cache Cabal artifacts - with: - path: dist-cache - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-cabal-cache-${{ hashFiles('**/*.cabal') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-cabal-cache- - ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}- - ${{ runner.os }}-${{ matrix.ghc }}- - ${{ runner.os }}- + # - uses: actions/cache@v4 + # id: cache-cabal + # name: Cache Cabal artifacts + # with: + # path: dist-cache + # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-cabal-cache-${{ hashFiles('**/*.cabal') }} + # restore-keys: | + # ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-cabal-cache- + # ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}- + # ${{ runner.os }}-${{ matrix.ghc }}- + # ${{ runner.os }}- - - name: Get cabal-cache - run: | - cabal new-install cabal-cache + # - name: Get cabal-cache + # run: | + # cabal new-install cabal-cache - name: Configure project run: | @@ -50,8 +50,8 @@ jobs: cabal v2-configure --project-file=cabal.project.ci --disable-optimization --enable-tests --write-ghc-environment-files=always -j2 cd semantic-source && cabal v2-configure --project-file=cabal.project.ci --disable-optimization --enable-tests --write-ghc-environment-files=always -j2 - - name: Restore from cache - run: cabal-cache sync-from-archive --threads=2 --archive-uri=dist-cache || true + # - name: Restore from cache + # run: cabal-cache sync-from-archive --threads=2 --archive-uri=dist-cache || true - name: Build & test run: | @@ -71,5 +71,5 @@ jobs: cabal v2-run --project-file=cabal.project.ci semantic-typescript:test cd semantic-source && cabal v2-run --project-file=cabal.project.ci semantic-source:test - - name: Write out cache - run: cabal-cache sync-to-archive --threads=2 --archive-uri=dist-cache + # - name: Write out cache + # run: cabal-cache sync-to-archive --threads=2 --archive-uri=dist-cache