-
Notifications
You must be signed in to change notification settings - Fork 263
79 lines (75 loc) · 2.58 KB
/
refman.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build DafnyRef.pdf
on:
workflow_dispatch:
pull_request:
branches: [ master, main-* ]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-deep-tests:
uses: ./.github/workflows/check-deep-tests-reusable.yml
build-refman:
needs: check-deep-tests
if: always() && (( github.event_name == 'pull_request' && (needs.check-deep-tests.result == 'success' || contains(github.event.pull_request.labels.*.name, 'run-deep-tests'))) || ( github.event_name == 'push' && ( github.ref_name == 'master' || vars.TEST_ON_FORK == 'true' )))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
steps:
- name: OS
run: echo ${{ runner.os }} ${{ matrix.os }}
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Checkout Dafny
uses: actions/checkout@v4
with:
submodules: recursive
path: dafny
- name: Build Dafny
run: dotnet build dafny/Source/Dafny.sln
- name: Install pandoc - Linux
if: runner.os == 'Linux'
run: |
wget https://github.com/jgm/pandoc/releases/download/3.1.7/pandoc-3.1.7-1-amd64.deb
sudo dpkg -i *.deb
rm -rf *.deb
pandoc -v
sudo gem install rouge
- name: Install pandoc - MacOS
if: runner.os == 'MacOS'
run: |
unset HOMEBREW_NO_INSTALL_FROM_API
brew untap Homebrew/core
brew update-reset && brew update
brew install pandoc
pandoc -v
sudo gem install rouge -v 3.30.0
- name: Install Tectonic
uses: wtfjoke/setup-tectonic@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tectonic-version: 0.15
- name: Build reference manual
run: |
eval "$(/usr/libexec/path_helper)"
rm -f dafny/docs/DafnyRef/DafnyRef.pdf
make -C dafny/docs/DafnyRef
- name: Check
run: ls -la dafny/docs/DafnyRef/DafnyRef.pdf
- uses: actions/upload-artifact@v4
if: always()
with:
name: DafnyRef
path: dafny/docs/DafnyRef/DafnyRef.pdf
# Building the reference manual may update files,
# such as renumbering sections or updating Options.txt.
# These changes should have been checked in earlier,
# so fail the build if anything changed.
- name: Check for modifications
run: 'git diff --exit-code || (echo "ERROR: Source changes detected (see above). Build the reference manual locally and commit these changes." && exit 1)'
working-directory: dafny