9
9
- master
10
10
- experimental
11
11
12
- # # See 'Pick Agda version' for branch-specific commit selection
12
+ # #######################################################################
13
+ # # CONFIGURATION
14
+ # #
15
+ # # See SETTINGS for the most important configuration variable: AGDA_COMMIT.
16
+ # # It has to be defined as a build step because it is potentially branch
17
+ # # dependent.
18
+ # #
19
+ # # As for the rest:
20
+ # #
21
+ # # Basically do not touch GHC_VERSION and CABAL_VERSION as long as
22
+ # # they aren't a problem in the build. If you have time to waste, it
23
+ # # could be worth investigating whether newer versions of ghc produce
24
+ # # more efficient Agda executable and could cut down the build time.
25
+ # # Just be aware that actions are flaky and small variations are to be
26
+ # # expected.
27
+ # #
28
+ # # The CABAL_INSTALL variable only passes `-O1` optimisations to ghc
29
+ # # because github actions cannot currently handle a build using `-O2`.
30
+ # # To be experimented with again in the future to see if things have
31
+ # # gotten better.
32
+ # #
33
+ # # The AGDA variable specifies the command to use to build the library.
34
+ # # It currently passes the flag `-Werror` to ensure maximal compliance
35
+ # # with e.g. not relying on deprecated definitions.
36
+ # # The rest are some arbitrary runtime arguments that shape the way Agda
37
+ # # allocates and garbage collects memory. It should make things faster.
38
+ # # Limits can be bumped if the builds start erroring with out of memory
39
+ # # errors.
40
+ # #
41
+ # #######################################################################
42
+
13
43
env :
14
44
GHC_VERSION : 8.6.5
15
45
CABAL_VERSION : 3.2.0.0
20
50
test-stdlib :
21
51
runs-on : ubuntu-latest
22
52
steps :
53
+
54
+ # #######################################################################
55
+ # # SETTINGS
56
+ # #
57
+ # # AGDA_COMMIT picks the version of Agda to use to build the library.
58
+ # # It can either be a hash of a specific commit (to target a bugfix for
59
+ # # instance) or a tag e.g. tags/v2.6.1.3 (to target a released version).
60
+ # #
61
+ # # AGDA_HTML_DIR picks the html/ subdir in which to publish the docs.
62
+ # # The content of the html/ directory will be deployed so we put the
63
+ # # master version at the root and the experimental in a subdirectory.
64
+ # #######################################################################
65
+
23
66
- name : Initialise variables
24
67
run : |
25
68
if [[ '${{ github.ref }}' == 'refs/heads/master' \
39
82
echo "AGDA_DEPLOY=true" >> $GITHUB_ENV
40
83
fi
41
84
85
+ # #######################################################################
86
+ # # CACHING
87
+ # #######################################################################
88
+
89
+
90
+ # This caching step allows us to save a lot of building time by only
91
+ # downloading ghc and cabal and rebuilding Agda if absolutely necessary
92
+ # i.e. if we change either the version of Agda, ghc, or cabal that we want
93
+ # to use for the build.
42
94
- name : Cache cabal packages
43
95
uses : actions/cache@v2
44
96
id : cache-cabal
@@ -49,6 +101,10 @@ jobs:
49
101
~/.cabal/bin
50
102
key : ${{ runner.os }}-${{ env.GHC_VERSION }}-${{ env.CABAL_VERSION }}-${{ env.AGDA_COMMIT }}
51
103
104
+ # #######################################################################
105
+ # # INSTALLATION STEPS
106
+ # #######################################################################
107
+
52
108
- name : Install cabal
53
109
if : steps.cache-cabal.outputs.cache-hit != 'true'
54
110
@@ -73,7 +129,11 @@ jobs:
73
129
${{ env.CABAL_INSTALL }}
74
130
cd ..
75
131
76
- # Download and test stdlib
132
+ # #######################################################################
133
+ # # TESTING AND DEPLOYMENT
134
+ # #######################################################################
135
+
136
+ # By default github actions do not pull the repo
77
137
- name : Checkout stdlib
78
138
uses : actions/checkout@v2
79
139
@@ -86,6 +146,10 @@ jobs:
86
146
${{ env.AGDA }} --safe EverythingSafe.agda
87
147
${{ env.AGDA }} index.agda
88
148
149
+ # We start by retrieving the currently deployed docs
150
+ # We remove the content that is in the directory we are going to populate
151
+ # so that stale files corresponding to deleted modules do not accumulate.
152
+ # We then generate the docs in the AGDA_HTML_DIR subdirectory
89
153
- name : Generate HTML
90
154
run : |
91
155
git clone --depth 1 --single-branch --branch gh-pages https://github.com/agda/agda-stdlib html
0 commit comments