3131# #######################################################################
3232
3333env :
34- AGDA_VERSION : " 2.7.0.1 "
35- STDLIB_VERSION : " 2.1 "
34+ AGDA_VERSION : " 2.8.0 "
35+ STDLIB_VERSION : " 2.3 "
3636
3737 AGDA : agda --auto-inline -Werror +RTS -M6G -H3.5G -A128M -RTS -i . -i src/
3838
@@ -53,35 +53,34 @@ jobs:
5353 run : |
5454 # Only deploy if the build follows from pushing to master
5555 if [[ '${{ github.ref }}' == 'refs/heads/master' ]]; then
56- echo "AGDA_DEPLOY=true" >> $ GITHUB_ENV
56+ echo "AGDA_DEPLOY=true" >> "${ GITHUB_ENV}"
5757 fi
5858
5959# #######################################################################
60- # # CACHING
60+ # # INSTALLATION STEPS
6161# #######################################################################
6262
63- # This caching step allows us to save a lot of building time by only
64- # downloading ghc and cabal and rebuilding Agda if absolutely necessary
65- # i.e. if we change either the version of Agda, ghc, or cabal that we want
66- # to use for the build.
67- - name : Open cache
68- uses : actions/cache@v4
69- id : cache-everything
63+ - name : Install Agda
64+ uses : agda/agda-setup-action@v1
65+ id : setup
7066 with :
71- path : |
72- ~/.agda
73- ~/_build
74- key : ${{ runner.os }}-agda-${{ env.AGDA_VERSION }}
67+ agda-version : ${{ env.AGDA_VERSION }}
68+ agda-stdlib-version : ${{ env.STDLIB_VERSION }}
7569
7670# #######################################################################
77- # # INSTALLATION STEPS
71+ # # CACHING: RESTORE
7872# #######################################################################
7973
80- - name : Install Agda
81- uses : wenkokke/setup-agda@main
74+ # This caching step allows us to save a lot of building time by
75+ # saving the previous build.
76+ - name : Restore cache
77+ uses : actions/cache/restore@v4
78+ id : cache
8279 with :
83- agda-version : ${{ env.AGDA_VERSION }}
84- agda-stdlib-version : ${{ env.STDLIB_VERSION }}
80+ path : |
81+ ${{ steps.setup.outputs.agda-dir }}
82+ _build
83+ key : ${{ runner.os }}-agda-${{ env.AGDA_VERSION }}-commit-${{ github.sha }}
8584
8685# #######################################################################
8786# # TESTING
@@ -107,8 +106,23 @@ jobs:
107106# #######################################################################
108107
109108 - name : Deploy HTML
110- uses : JamesIves/github-pages-deploy-action@v4.7.3
111- if : ${{ success() && env.AGDA_DEPLOY }}
109+ uses : JamesIves/github-pages-deploy-action@v4
110+ if : success() && env.AGDA_DEPLOY
112111 with :
113112 branch : gh-pages
114113 folder : html
114+
115+ # #######################################################################
116+ # # CACHING: SAVE
117+ # #######################################################################
118+
119+ # This caching step allows us to save a lot of building time by
120+ # saving the previous build.
121+ - name : Save cache
122+ uses : actions/cache/save@v4
123+ if : always()
124+ with :
125+ path : |
126+ ${{ steps.setup.outputs.agda-dir }}
127+ _build
128+ key : ${{ steps.cache.outputs.cache-primary-key }}
0 commit comments