-
Notifications
You must be signed in to change notification settings - Fork 129
139 lines (125 loc) · 4.34 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
139
name: "windows"
on:
push:
branches: [ '**']
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '27 4 * * 2'
workflow_dispatch:
inputs:
attestation:
description: 'Generate attestation for binary artifacts'
required: false
default: false
type: boolean
jobs:
windows:
name: windows Build
permissions:
id-token: write
contents: write
attestations: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- QT_VERSION: '6.2.4'
ARCH: 'amd64'
HOST_ARCH: 'amd64'
COMPILER: 'msvc2019_64'
TOOLSET: 'v142,version=14.29.30133'
METHOD: 'aqt'
GENERATOR: 'Visual Studio 16 2019'
RELEASE: false
os: windows-2019
- QT_VERSION: '6.2.4'
ARCH: 'amd64'
HOST_ARCH: 'amd64'
COMPILER: 'msvc2019_64'
METHOD: 'aqt'
GENERATOR: 'Visual Studio 17 2022'
RELEASE: false
os: windows-latest
- QT_VERSION: '6.5.3'
ARCH: 'amd64'
HOST_ARCH: 'amd64'
COMPILER: 'msvc2019_64'
METHOD: 'aqt'
RELEASE: true
GENERATOR: 'Ninja'
os: windows-latest
- QT_VERSION: '6.8.1'
ARCH: 'amd64'
HOST_ARCH: 'amd64'
COMPILER: 'msvc2022_64'
METHOD: 'aqt'
RELEASE: false
GENERATOR: 'Ninja'
os: windows-2025
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Qt
uses: actions/cache@v4
id: cache
with:
path: ~/Cache
key: ${{ runner.os }}-${{ matrix.QT_VERSION }}-${{ matrix.COMPILER }}-${{ secrets.CACHE_VERSION }}
- name: Install Qt setup(aqt)
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Qt
if: steps.cache.outputs.cache-hit != 'true'
env:
CI_BUILD_DIR: ${{ github.workspace }}
shell: bash
run: |
./tools/ci_install_windows.sh "${{ matrix.QT_VERSION }}" "${{ matrix.COMPILER }}" "${{ matrix.METHOD }}"
- name: Install Inno Setup
if: matrix.os == 'windows-2025'
run: choco install innosetup
- name: Build
shell: powershell
run: |
.\tools\ci_setup_windows.ps1 -qtdir "$Home\Cache\Qt\${{ matrix.QT_VERSION }}\${{ matrix.COMPILER }}" -arch "${{ matrix.ARCH }}" -host_arch "${{ matrix.HOST_ARCH }}" -vcversion "${{ matrix.VCVERSION }}"
.\tools\ci_script_windows.ps1 -generator "${{ matrix.GENERATOR }}" -arch "${{ matrix.ARCH }}" -toolset "${{ matrix.TOOLSET }}"
- name: Rename
shell: bash
run: |
VERSION_ID=$(date -u +%Y%m%dT%H%MZ --date=$(git show -s --format=%aI HEAD))-$(git rev-parse --short=7 HEAD)
mv bld/gui/GPSBabel-*-Setup.exe bld/gui/GPSBabel-${VERSION_ID}-Setup.exe
mv bld/gui/GPSBabel-*-Manifest.txt bld/gui/GPSBabel-${VERSION_ID}-Manifest.txt
- name: Test
shell: bash
run: |
# PATH="${HOME}/Cache/Qt/${{ matrix.QT_VERSION }}/${{ matrix.COMPILER }}/bin:${PATH}"
PNAME=./bld/gui/package/gpsbabel.exe GBTEMP=./gbtemp ./testo 2>&1
PNAME=./bld/gui/package/gpsbabel.exe GBTEMP=./gbtemp ./test_encoding_utf8 2>&1
- name: Generate artifact attestation
if: ${{ inputs.attestation && matrix.RELEASE }}
uses: actions/attest-build-provenance@v2
with:
subject-path: 'bld/gui/GPSBabel-*-Setup.exe'
- name: Deploy
# This only handles continous releases now, for other events artifacts may be saved in
# the 'Upload Artifacts' step.
if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: Continuous-${{ runner.os }}
run: |
./tools/uploadtool/upload_github.sh bld/gui/GPSBabel-*-Setup.exe
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v4
with:
name: Windows_Installer ${{ join(matrix.*) }}
path: |
bld/gui/GPSBabel-*-Setup.exe
bld/gui/GPSBabel-*-Manifest.txt
retention-days: 7