From a631724e26fd24c1c5abba5bf8acbc7eaa609dbf Mon Sep 17 00:00:00 2001 From: Rahul Chhabra Date: Tue, 12 Dec 2023 14:43:52 +0530 Subject: [PATCH 1/5] Update main.yml --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1235c53..9d0bcda 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,11 +19,11 @@ jobs: id: cache-cabal with: path: | - ~/.cabal/packages - ~/.cabal/store - ~/.cabal/bin - ~/.local/bin - dist-newstyle + ~/.cabal/packages + ~/.cabal/store + ~/.cabal/bin + ~/.local/bin + dist-newstyle key: ${{ runner.os }}-${{ matrix.ghc-ver }}-${{ matrix.cabal-ver }}-${{ matrix.agda-ref }} - name: Install cabal if: steps.cache-cabal.outputs.cache != 'true' @@ -74,4 +74,4 @@ jobs: cd master cd src agda --html --html-dir=../docs index.agda - cp -f -R main/ ~/main-build/ \ No newline at end of file + cp -f -R main/ ~/main-build/ From 002b8c231b80695888d2ea8e85284b56c5662bb8 Mon Sep 17 00:00:00 2001 From: Rahul Chhabra Date: Tue, 12 Dec 2023 14:46:22 +0530 Subject: [PATCH 2/5] Update main.yml --- .github/workflows/main.yml | 140 ++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d0bcda..4292de9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,75 +3,75 @@ on: [push] jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 60 + build: + runs-on: ubuntu-latest + timeout-minutes: 60 - strategy: - matrix: - agda-ref: ["v2.6.3"] - ghc-ver: ["8.10.2"] - cabal-ver: ["3.4.0.0"] - cubical-ref: ["rahulc29/realizability"] - steps: - - uses: actions/cache@v2 - name: Cache cabal packages - id: cache-cabal - with: - path: | - ~/.cabal/packages - ~/.cabal/store - ~/.cabal/bin - ~/.local/bin - dist-newstyle - key: ${{ runner.os }}-${{ matrix.ghc-ver }}-${{ matrix.cabal-ver }}-${{ matrix.agda-ref }} - - name: Install cabal - if: steps.cache-cabal.outputs.cache != 'true' - uses: actions/setup-haskell@v1.1.3 - with: - ghc-version: ${{ matrix.ghc-ver }} - cabal-version: ${{ matrix.cabal-ver }} - - name: Put cabal binaries in PATH - run: echo "~/.cabal/bin" >> $GITHUB_PATH - - name: Download Agda from Github - if: steps.cache-cabal.outputs.cache-hit != 'true' - uses: actions/checkout@v2 - with: - repository: agda/agda - path: agda - ref: ${{ matrix.agda-ref }} - - name: Install Agda - if: steps.cache-cabal.outputs.cache-hit != 'true' - run: | - cabal update - cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' alex-3.2.5 - cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' happy-1.19.12 - cd agda - mkdir -p doc - touch doc/user-manual.pdf - cabal install --overwrite-policy=always --ghc-options='-O1 +RTS -M6G -RTS' - - name: Checkout realizability fork of Cubical - uses: actions/checkout@v2 - with: - repository: rahulc29/cubical - path: cubical - ref: ${{ matrix.cubical-ref }} - - name: Put cubical library in Agda library list - run: | - mkdir -p ~/.agda/ - touch ~/.agda/libraries - echo "$GITHUB_WORKSPACE/cubical/cubical.agda-lib" > ~/.agda/libraries - - name: Checkout master - uses: actions/checkout@v2 - with: - path: master + strategy: + matrix: + agda-ref: ["v2.6.3"] + ghc-ver: ["8.10.2"] + cabal-ver: ["3.4.0.0"] + cubical-ref: ["rahulc29/realizability"] + steps: + - uses: actions/cache@v2 + name: Cache cabal packages + id: cache-cabal + with: + path: | + ~/.cabal/packages + ~/.cabal/store + ~/.cabal/bin + ~/.local/bin + dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc-ver }}-${{ matrix.cabal-ver }}-${{ matrix.agda-ref }} + - name: Install cabal + if: steps.cache-cabal.outputs.cache != 'true' + uses: actions/setup-haskell@v1.1.3 + with: + ghc-version: ${{ matrix.ghc-ver }} + cabal-version: ${{ matrix.cabal-ver }} + - name: Put cabal binaries in PATH + run: echo "~/.cabal/bin" >> $GITHUB_PATH + - name: Download Agda from Github + if: steps.cache-cabal.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: agda/agda + path: agda + ref: ${{ matrix.agda-ref }} + - name: Install Agda + if: steps.cache-cabal.outputs.cache-hit != 'true' + run: | + cabal update + cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' alex-3.2.5 + cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' happy-1.19.12 + cd agda + mkdir -p doc + touch doc/user-manual.pdf + cabal install --overwrite-policy=always --ghc-options='-O1 +RTS -M6G -RTS' + - name: Checkout realizability fork of Cubical + uses: actions/checkout@v2 + with: + repository: rahulc29/cubical + path: cubical + ref: ${{ matrix.cubical-ref }} + - name: Put cubical library in Agda library list + run: | + mkdir -p ~/.agda/ + touch ~/.agda/libraries + echo "$GITHUB_WORKSPACE/cubical/cubical.agda-lib" > ~/.agda/libraries + - name: Checkout master + uses: actions/checkout@v2 + with: + path: master - - name: Compile main library - run: | - mkdir -p ~/main-build/_build - cp -f -R ~/main-build/_build $GITHUB_WORKSPACE/main/_build - rm -r ~/main-build - cd master - cd src - agda --html --html-dir=../docs index.agda - cp -f -R main/ ~/main-build/ + - name: Compile main library + run: | + mkdir -p ~/main-build/_build + cp -f -R ~/main-build/_build $GITHUB_WORKSPACE/main/_build + rm -r ~/main-build + cd master + cd src + agda --html --html-dir=../docs index.agda + cp -f -R main/ ~/main-build/ From 1f5fa7c5a4de735a4febf1d5a14aaeaae75f3d83 Mon Sep 17 00:00:00 2001 From: Rahul Chhabra Date: Tue, 12 Dec 2023 14:47:24 +0530 Subject: [PATCH 3/5] Fix indentation --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4292de9..cd206b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: ghc-version: ${{ matrix.ghc-ver }} cabal-version: ${{ matrix.cabal-ver }} - name: Put cabal binaries in PATH - run: echo "~/.cabal/bin" >> $GITHUB_PATH + run: echo "~/.cabal/bin" >> $GITHUB_PATH - name: Download Agda from Github if: steps.cache-cabal.outputs.cache-hit != 'true' uses: actions/checkout@v2 From 3398692ab2b052498c00122150cf6cc1f5f12cbc Mon Sep 17 00:00:00 2001 From: Rahul Chhabra Date: Tue, 12 Dec 2023 14:48:43 +0530 Subject: [PATCH 4/5] Fix cabal cache task --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cd206b7..0965a24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,13 +18,13 @@ jobs: name: Cache cabal packages id: cache-cabal with: - path: | - ~/.cabal/packages - ~/.cabal/store - ~/.cabal/bin - ~/.local/bin - dist-newstyle - key: ${{ runner.os }}-${{ matrix.ghc-ver }}-${{ matrix.cabal-ver }}-${{ matrix.agda-ref }} + path: | + ~/.cabal/packages + ~/.cabal/store + ~/.cabal/bin + ~/.local/bin + dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc-ver }}-${{ matrix.cabal-ver }}-${{ matrix.agda-ref }} - name: Install cabal if: steps.cache-cabal.outputs.cache != 'true' uses: actions/setup-haskell@v1.1.3 From 7be227f131eaef50c1215db5609d6dac679c8003 Mon Sep 17 00:00:00 2001 From: Rahul Chhabra Date: Tue, 12 Dec 2023 15:11:09 +0530 Subject: [PATCH 5/5] Update main.yml --- .github/workflows/main.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0965a24..5ea3b8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,10 +68,6 @@ jobs: - name: Compile main library run: | - mkdir -p ~/main-build/_build - cp -f -R ~/main-build/_build $GITHUB_WORKSPACE/main/_build - rm -r ~/main-build cd master cd src agda --html --html-dir=../docs index.agda - cp -f -R main/ ~/main-build/