-
Notifications
You must be signed in to change notification settings - Fork 94
79 lines (79 loc) · 2.77 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
name: build-asy-cxx-windows
on:
workflow_dispatch:
pull_request:
branches:
- "master"
- "a/*"
push:
branches:
- msvc-*
jobs:
configure-windows-msvc-x64:
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Cache Vcpkg
id: cache-vcpkg
uses: actions/cache@v3
with:
path: ~\AppData\Local\vcpkg\archives
key: ${{ runner.os }}-vcpkg-cache
- name: Configure MSVC-Release
shell: pwsh
run: |
$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"
cmake --preset msvc/release
- name: zip cmake configuration
shell: pwsh
# Compress-Archive cmdlet does not support hidden files
run: |
$loc = Get-Location
[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@v3
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@v3
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Download configuration artifacts
uses: actions/download-artifact@v3
with:
name: cmake-msvc-x64-release-cfg-zip
- name: Unzip configuration artifact
run: |
Expand-Archive `
-Path cmake-msvc-x64-release-cfg.zip `
-DestinationPath .
- name: Build asymptote on windows
run: |
$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"
cmake --build --preset msvc/release --target asy-with-basefiles -j
- name: Archive Asymptote build
uses: actions/upload-artifact@v3
with:
name: asy-win-x64-buildfiles
path: |
cmake-build-msvc/release/asy.exe
cmake-build-msvc/release/base
cmake-build-msvc/release/CTestTestfile.cmake
cmake-build-msvc/release/*.dll