Debian Codegraph @

.github/workflows/coq-archlinux.yml

raw symbols SCIP
1 name: CI (Coq, Arch Linux)
2
3 on:
4 push:
5 branches: [ master ]
6 pull_request:
7 merge_group:
8 workflow_dispatch:
9 release:
10 types: [published]
11 schedule:
12 - cron: '0 0 1 * *'
13
14 jobs:
15 build:
16
17 runs-on: ubuntu-latest
18 container: archlinux
19 name: archlinux
20
21 concurrency:
22 group: ${{ github.workflow }}-archlinux-${{ github.head_ref || github.run_id }}
23 cancel-in-progress: true
24
25 steps:
26 - name: Install system dependencies
27 run: |
28 pacman --noconfirm -Syu base-devel git make python3 which jq ghc ghc-static time diffutils coq ocaml-zarith --needed
29 - uses: actions/checkout@v4
30 with:
31 submodules: recursive
32 - name: work around coq issue 15663
33 run: |
34 ln -s /usr/lib/coq /usr/lib/ocaml/coq
35 ln -s /usr/lib/coq-core /usr/lib/ocaml/coq-core
36 ln -s /usr/lib/coqide-server /usr/lib/ocaml/coqide-server
37 - name: Work around https://github.com/actions/checkout/issues/766
38 run: git config --global --add safe.directory "*"
39 - name: chroot build params
40 run: etc/ci/describe-system-config.sh
41 - name: make deps
42 run: etc/ci/github-actions-make.sh -j2 deps
43 - name: all-except-generated-and-js-of-ocaml
44 run: etc/ci/github-actions-make.sh -j2 all-except-generated-and-js-of-ocaml
45 - name: generated-files
46 run: etc/ci/github-actions-make.sh -j2 generated-files
47 - run: tar -czvf generated-files.tgz fiat-*/
48 if: failure()
49 - name: upload generated files
50 uses: actions/upload-artifact@v4
51 with:
52 name: generated-files-archlinux
53 path: generated-files.tgz
54 if: failure()
55 - run: find . -name "*.timing" | xargs tar -czvf timing-files.tgz
56 if: failure()
57 - name: upload generated timing files
58 uses: actions/upload-artifact@v4
59 with:
60 name: timing-files-archlinux
61 path: timing-files.tgz
62 if: failure()
63 - name: install-standalone-unified-ocaml
64 run: etc/ci/github-actions-make.sh install-standalone-unified-ocaml BINDIR=dist
65 #- name: standalone-js-of-ocaml
66 # run: etc/ci/github-actions-make.sh -j2 standalone-js-of-ocaml
67 #- name: install-standalone-js-of-ocaml
68 # run: etc/ci/github-actions-make.sh install-standalone-js-of-ocaml
69 - name: upload standalone files
70 uses: actions/upload-artifact@v4
71 with:
72 name: standalone-archlinux
73 path: dist/fiat_crypto
74 #- name: upload standalone js files
75 # uses: actions/upload-artifact@v4
76 # with:
77 # name: standalone-html-archlinux
78 # path: fiat-html
79 - name: upload OCaml files
80 uses: actions/upload-artifact@v4
81 with:
82 name: ExtractionOCaml-archlinux
83 path: src/ExtractionOCaml
84 if: always ()
85 #- name: upload js_of_ocaml files
86 # uses: actions/upload-artifact@v4
87 # with:
88 # name: ExtractionJsOfOCaml-archlinux
89 # path: src/ExtractionJsOfOCaml
90 # if: always ()
91 - name: standalone-haskell
92 run: etc/ci/github-actions-make.sh -j1 standalone-haskell GHCFLAGS='+RTS -M7G -RTS'
93 - name: upload Haskell files
94 uses: actions/upload-artifact@v4
95 with:
96 name: ExtractionHaskell-archlinux
97 path: src/ExtractionHaskell
98 if: always ()
99 - name: only-test-amd64-files-lite
100 run: etc/ci/github-actions-make.sh -j2 only-test-amd64-files-lite SLOWEST_FIRST=1
101 - name: install
102 run: etc/ci/github-actions-make.sh EXTERNAL_DEPENDENCIES=1 SKIP_COQSCRIPTS_INCLUDE=1 install install-standalone-ocaml
103 - name: install-without-bedrock2
104 run: etc/ci/github-actions-make.sh EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 install-without-bedrock2 install-standalone-ocaml
105 - name: install-dev
106 run: etc/ci/github-actions-make.sh EXTERNAL_REWRITER=1 EXTERNAL_COQPRIME=1 install install-standalone-ocaml
107 - name: display timing info
108 run: cat time-of-build-pretty.log
109 - name: display per-line timing info
110 run: etc/ci/github-actions-display-per-line-timing.sh
111
112 test-standalone:
113 runs-on: ubuntu-latest
114 container: archlinux
115 needs: build
116 steps:
117 - name: Install system dependencies
118 run: |
119 pacman --noconfirm -Syu git --needed
120 - uses: actions/checkout@v4
121 - name: Download standalone archlinux
122 uses: actions/download-artifact@v4
123 with:
124 name: standalone-archlinux
125 path: dist/
126 - name: List files
127 run: find dist
128 - run: chmod +x dist/fiat_crypto
129 - name: Test files (container)
130 run: |
131 echo "::group::file fiat_crypto"
132 file dist/fiat_crypto
133 echo "::endgroup::"
134 echo "::group::ldd fiat_crypto"
135 ldd dist/fiat_crypto
136 echo "::endgroup::"
137 etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto
138
139 publish-standalone-dry-run:
140 runs-on: ubuntu-latest
141 needs: build
142 # permissions:
143 # contents: write # IMPORTANT: mandatory for making GitHub Releases
144 steps:
145 - uses: actions/checkout@v4
146 with:
147 fetch-depth: 0 # Fetch all history for all tags and branches
148 tags: true # Fetch all tags as well, `fetch-depth: 0` might be sufficient depending on Git version
149 - name: Download standalone archlinux
150 uses: actions/download-artifact@v4
151 with:
152 name: standalone-archlinux
153 path: dist/
154 - name: List files
155 run: find dist
156 - name: Rename files
157 run: |
158 echo "::group::find arch"
159 arch="$(etc/ci/find-arch.sh dist/fiat_crypto "unknown")"
160 tag="$(git describe --tags HEAD)"
161 fname="Fiat-Cryptography_${tag}_Linux_archlinux_${arch}"
162 echo "$fname"
163 mv dist/fiat_crypto "dist/$fname"
164 find dist
165 # - name: Upload artifacts to GitHub Release
166 # env:
167 # GITHUB_TOKEN: ${{ github.token }}
168 # # Upload to GitHub Release using the `gh` CLI.
169 # # `dist/` contains the built packages
170 # run: >-
171 # gh release upload
172 # '${{ github.ref_name }}' dist/**
173 # --repo '${{ github.repository }}'
174 # if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}
175
176 archlinux-check-all:
177 runs-on: ubuntu-latest
178 needs: [build, test-standalone, publish-standalone-dry-run]
179 if: always()
180 steps:
181 - run: echo 'build passed'
182 if: ${{ needs.build.result == 'success' }}
183 - run: echo 'test-standalone passed'
184 if: ${{ needs.test-standalone.result == 'success' }}
185 - run: echo 'publish-standalone-dry-run passed'
186 if: ${{ needs.publish-standalone-dry-run.result == 'success' }}
187 - run: echo 'build failed' && false
188 if: ${{ needs.build.result != 'success' }}
189 - run: echo 'test-standalone failed' && false
190 if: ${{ needs.test-standalone.result != 'success' }}
191 - run: echo 'publish-standalone-dry-run failed' && false
192 if: ${{ needs.publish-standalone-dry-run.result != 'success' }}