Skip to content

fix lost error message #2599

fix lost error message

fix lost error message #2599

Workflow file for this run

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.0'
ARCH: 'amd64'
HOST_ARCH: 'amd64'
COMPILER: 'msvc2022_64'
METHOD: 'aqt'
RELEASE: false
GENERATOR: 'Ninja'
os: windows-latest
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.9'
- 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: 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@v1
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