-
Notifications
You must be signed in to change notification settings - Fork 95
153 lines (153 loc) · 5.65 KB
/
build-asy-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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: build-asy-cxx-windows
on:
workflow_call:
inputs:
version_override:
type: string
default: ""
workflow_dispatch:
inputs:
version_override:
type: string
description: Version override. If not given, will use the default value in configure.ac.
default: ""
env:
pwsh_initialize_devenv: |
$VsInfo = Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs
& "$($VsInfo.InstallLocation)\\Common7\\Tools\\Launch-VsDevShell.ps1" `
-Arch amd64 -HostArch amd64 -SkipAutomaticLocation
$env:VCPKG_ROOT = "$env:VCPKG_INSTALLATION_ROOT"
$env:ASY_VERSION_OVERRIDE = "${{ inputs.version_override }}"
cmake_msvc_profile: msvc/release/ci/with-external-asymptote-pdf
jobs:
configure-windows-msvc-x64:
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Configure MSVC-Release
shell: pwsh
run: |
${{ env.pwsh_initialize_devenv }}
cmake --preset ${{ env.cmake_msvc_profile }}
- name: zip cmake configuration
shell: pwsh
# Compress-Archive cmdlet does not support hidden files
# remove vcpkg_installed to make config zip smaller
run: |
$loc = Get-Location
Remove-Item -Recurse -Force cmake-build-msvc\release\vcpkg_installed
[System.IO.Compression.ZipFile]::CreateFromDirectory(`
"$($loc.Path)\cmake-build-msvc",`
"$($loc.Path)\cmake-msvc-x64-release-cfg.zip",`
[System.IO.Compression.CompressionLevel]::NoCompression,`
$true`
)
- name: Upload configuration artifacts
uses: actions/upload-artifact@v4
with:
name: cmake-msvc-x64-release-cfg-zip
path: cmake-msvc-x64-release-cfg.zip
build-windows-msvc-x64:
needs: configure-windows-msvc-x64
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Setup TeXLive Action
uses: teatimeguest/[email protected]
with:
packages: |
scheme-basic
hypdoc
parskip
etoolbox
ocgx2
media9
- name: Install ghostscript
shell: pwsh
run: choco install ghostscript
- name: Download configuration artifacts
uses: actions/download-artifact@v4
with:
name: cmake-msvc-x64-release-cfg-zip
- name: Unzip configuration artifact
run: |
Expand-Archive `
-Path cmake-msvc-x64-release-cfg.zip `
-DestinationPath .
- name: Generate version suffix for github runner, in case version is not specified
if: ${{ inputs.version_override == '' }}
run: |
"set(ASY_VERSION_SUFFIX `-ci`")" | Out-File -Path asy-pkg-version-suffix.cmake
- name: Remove CMakeCache.txt
run: Remove-Item cmake-build-msvc/release/CMakeCache.txt
- name: Reconfigure CMake (now that we have TeX Live)
run: |
${{ env.pwsh_initialize_devenv }}
cmake --preset ${{ env.cmake_msvc_profile }}
- name: Upload cmake install file
uses: actions/upload-artifact@v4
with:
name: asy-win-x64-install-file
path: |
cmake-build-msvc/release/**/cmake_install.cmake
cmake-build-msvc/release/nsifiles
- name: Build asymptote on windows
run: |
${{ env.pwsh_initialize_devenv }}
cmake --build cmake-build-msvc/release --target asy-with-basefiles -j
- name: Build misc files on windows
run: |
${{ env.pwsh_initialize_devenv }}
cmake --build cmake-build-msvc/release --target asy-dist-misc-files -j
- name: Archive Asymptote build
uses: actions/upload-artifact@v4
with:
name: asy-win-x64-buildfiles
path: |
cmake-build-msvc/release/asy.exe
cmake-build-msvc/release/base
cmake-build-msvc/release/*.dll
- name: Archive Asymptote misc files
uses: actions/upload-artifact@v4
with:
name: asy-win-x64-miscfiles
path: |
cmake-build-msvc/release/misc-output
- name: Build Asymptote google test
run: |
${{ env.pwsh_initialize_devenv }}
cmake --build cmake-build-msvc/release --target asyCxxTests -j
- name: Archive Asymptote gtest files
uses: actions/upload-artifact@v4
with:
name: asy-win-x64-gtest-files
path: |
cmake-build-msvc/release/cxxtests/asyCxxTests.exe
cmake-build-msvc/release/cxxtests/*.cmake
cmake-build-msvc/release/cxxtests/*.dll
- name: Archive Asymptote test files
uses: actions/upload-artifact@v4
with:
name: asy-win-x64-testfiles
path: |
cmake-build-msvc/release/CTest*.cmake
- name: Build asymptote documentation (except asymptote.pdf)
run: |
${{ env.pwsh_initialize_devenv }}
cmake --build cmake-build-msvc/release --target docgen -j
- name: Archive asymptote documentation
uses: actions/upload-artifact@v4
with:
name: asy-win-x64-misc-docs
path: |
cmake-build-msvc/release/docbuild/asymptote.sty
cmake-build-msvc/release/docbuild/asy-latex.pdf
cmake-build-msvc/release/docbuild/CAD.pdf
cmake-build-msvc/release/docbuild/TeXShopAndAsymptote.pdf
cmake-build-msvc/release/docbuild/asyRefCard.pdf