1
+ name : Ubuntu build
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ - experimental
7
+ pull_request :
8
+ branches :
9
+ - master
10
+ - experimental
11
+
12
+ # # See 'Pick Agda version' for branch-specific commit selection
13
+ env :
14
+ GHC_VERSION : 8.6.5
15
+ CABAL_VERSION : 3.2.0.0
16
+ CABAL_INSTALL : cabal install --overwrite-policy=always --ghc-options='-O1 +RTS -M6G -RTS'
17
+ AGDA : agda -Werror +RTS -M3.5G -H3.5G -A128M -RTS -i. -i src/
18
+
19
+ jobs :
20
+ test-stdlib :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Initialise variables
24
+ run : |
25
+ if [[ '${{ github.ref }}' == 'refs/heads/master' \
26
+ || '${{ github.base_ref }}' == 'master' ]]; then
27
+ # Pick Agda version for master
28
+ echo "AGDA_COMMIT=tags/v2.6.1.3.20210524" >> $GITHUB_ENV;
29
+ echo "AGDA_HTML_DIR=html" >> $GITHUB_ENV
30
+ elif [[ '${{ github.ref }}' == 'refs/heads/experimental' \
31
+ || '${{ github.base_ref }}' == 'experimental' ]]; then
32
+ # Pick Agda version for experimental
33
+ echo "AGDA_COMMIT=tags/v2.6.1.3.20210524" >> $GITHUB_ENV;
34
+ echo "AGDA_HTML_DIR=html/experimental" >> $GITHUB_ENV
35
+ fi
36
+
37
+ if [[ '${{ github.ref }}' == 'refs/heads/master' \
38
+ || '${{ github.ref }}' == 'refs/heads/experimental' ]]; then
39
+ echo "AGDA_DEPLOY=true" >> $GITHUB_ENV
40
+ fi
41
+
42
+ - name : Cache cabal packages
43
+ uses : actions/cache@v2
44
+ id : cache-cabal
45
+ with :
46
+ path : |
47
+ ~/.cabal/packages
48
+ ~/.cabal/store
49
+ ~/.cabal/bin
50
+ key : ${{ runner.os }}-${{ env.GHC_VERSION }}-${{ env.CABAL_VERSION }}-${{ env.AGDA_COMMIT }}
51
+
52
+ - name : Install cabal
53
+ if : steps.cache-cabal.outputs.cache-hit != 'true'
54
+
55
+ with :
56
+ ghc-version : ${{ env.GHC_VERSION }}
57
+ cabal-version : ${{ env.CABAL_VERSION }}
58
+
59
+ - name : Put cabal programs in PATH
60
+ run : echo "~/.cabal/bin" >> $GITHUB_PATH
61
+
62
+ - name : Cabal update
63
+ run : cabal update
64
+
65
+ - name : Download and install Agda from github
66
+ if : steps.cache-cabal.outputs.cache-hit != 'true'
67
+ run : |
68
+ git clone https://github.com/agda/agda
69
+ cd agda
70
+ git checkout ${{ env.AGDA_COMMIT }}
71
+ mkdir -p doc
72
+ touch doc/user-manual.pdf
73
+ ${{ env.CABAL_INSTALL }}
74
+ cd ..
75
+
76
+ # Download and test stdlib
77
+ - name : Checkout stdlib
78
+ uses : actions/checkout@v2
79
+
80
+ - name : Test stdlib
81
+ run : |
82
+ ${{ env.CABAL_INSTALL }} agda-stdlib-utils.cabal
83
+ cabal run GenerateEverything
84
+ cp travis/* .
85
+ ./index.sh
86
+ ${{ env.AGDA }} --safe EverythingSafe.agda
87
+ ${{ env.AGDA }} --html --html-dir ${{ env.AGDA_HTML_DIR }} index.agda
88
+
89
+ # This is a massive hack at the moment
90
+ # - name: Compile stdlib
91
+ # run: |
92
+ # ${{ env.AGDA }} -c --no-main --ghc-dont-call-ghc --compile-dir=tmp Everything.agda
93
+ # cd tmp
94
+ # yes | cabal init --interactive
95
+ # head -n -17 tmp.cabal > tmp
96
+ # mv tmp tmp.cabal
97
+ # cat ../travis/ghc-options >> tmp.cabal
98
+ # cabal build
99
+
100
+ # # ${{ env.AGDA }} -c README/Foreign/Haskell.agda && ./Haskell
101
+
102
+
103
+ - name : Deploy
104
+
105
+ if : ${{ success() && env.AGDA_DEPLOY }}
106
+
107
+ with :
108
+ branch : gh-pages
109
+ folder : html
110
+ git-config-name : Github Actions
0 commit comments