-
Notifications
You must be signed in to change notification settings - Fork 50
138 lines (120 loc) · 4.44 KB
/
windows.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Main doc: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions
# Runners spec: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
# Glob expressions: https://github.com/actions/toolkit/tree/main/packages/glob
name: Windows
###############################################################################
# Schedule:
# - push on any branch whose name matches v** or master
# - any pull request
###############################################################################
on:
push:
branches:
- main
pull_request:
branches:
- '**'
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
platform:
description: 'Arguments for the platform script:'
required: true
default: '-extent=x -parallel=p -jobs=2 -large=e -compcert=y -set-switch=y'
###############################################################################
# Platform script options shared among all jobs
###############################################################################
env:
PLATFORM_ARGS: -extent=x -parallel=p -jobs=2 -large=e -compcert=y -set-switch=y
COQREGTESTING: y
###############################################################################
# Windows
#
# 2 jobs, the former builds the installer, the second tests it
#
# CAVEATS:
# - git is misconfigured, by default it puts \r in between \n\n
###############################################################################
jobs:
Windows_platform:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture:
- '64'
variant:
# Keep this in sync with the Smoke test below
- '8.19~2024.10'
- '8.18~2023.11'
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Git checkout
uses: actions/checkout@v4
- name: Set PLATFORM
if: ${{ github.event.inputs.platform != '' }}
run: echo "PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV
- name: Run common platform script
shell: cmd
run: coq_platform_make_windows.bat -destcyg=C:\cygwin_coq_platform -arch=${{matrix.architecture}} -packages=${{matrix.variant}} %PLATFORM_ARGS% -dumplogs
- name: Create installer
shell: cmd
run: C:\cygwin_coq_platform\bin\bash --login -c "cd /platform/ && windows/create_installer_windows.sh && mkdir /cygdrive/c/installer && cp windows_installer/*exe /cygdrive/c/installer/"
- name: Create smoke test kit
shell: cmd
run: C:\cygwin_coq_platform\bin\bash --login -c "cd /platform/ && shell_scripts/create_smoke_test_kit.sh && mkdir /cygdrive/c/smoke && cp -ra smoke-test-kit/* /cygdrive/c/smoke/"
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: 'Windows installer ${{matrix.variant}} ${{matrix.architecture}}'
path: C:\installer\*.exe
retention-days: 5
- name: 'Upload smoke test kit'
uses: actions/upload-artifact@v4
with:
name: 'Smoke Test Kit Windows ${{matrix.variant}} ${{matrix.architecture}}'
path: C:\smoke\
retention-days: 5
Windows_smoke:
name: Smoke test Windows
needs: Windows_platform
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture:
- '64'
variant:
- '8.19~2024.10'
- '8.18~2023.11'
steps:
- name: 'Download Artifact'
uses: actions/download-artifact@v4
id: download
with:
name: 'Windows installer ${{matrix.variant}} ${{matrix.architecture}}'
- name: 'Download smoke test kit'
uses: actions/download-artifact@v4
id: download-smoke
with:
name: 'Smoke Test Kit Windows ${{matrix.variant}} ${{matrix.architecture}}'
- name: 'Run Installer'
shell: cmd
run: |
cd ${{steps.download.outputs.download-path}}
FOR %%f IN (*.exe) DO %%f /S /D=C:\Coq
- name: 'Smoke coqc'
shell: cmd
run: C:\Coq\bin\coqc.exe -v
- name: 'Run Windows smoke test kit'
shell: cmd
run: |
CD ${{steps.download-smoke.outputs.download-path}}
DIR
SET PATH=C:\Coq\bin\;%PATH%
CALL run-smoke-test.bat