Skip to content

build: Generate version_describe.h before build #22

build: Generate version_describe.h before build

build: Generate version_describe.h before build #22

Workflow file for this run

name: MSYS2 build
on:
push:
branches:
- master
tags:
- '**'
pull_request:
# Keep the long-running stress test on master unless a PR opts in with a
# force_testcore or force_long_tests label. Labels are read from the event
# payload, so a newly added label takes effect on the next push or reopen.
env:
TESTCORE_CONFIGURE_FLAG: >-
${{ (github.ref == 'refs/heads/master' ||
contains(github.event.pull_request.labels.*.name, 'force_testcore') ||
contains(github.event.pull_request.labels.*.name, 'force_long_tests'))
&& '--enable-testcore' || '' }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: ${{ matrix.msystem }} | ${{ matrix.architecture }}
runs-on: windows-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- msystem: MINGW32
architecture: Win32
packages: git mingw-w64-i686-cc mingw-w64-i686-autotools
build_dir: build-MinGW-Win32
install_dir: libusb-MinGW-Win32
- msystem: MINGW64
architecture: x64
packages: git mingw-w64-x86_64-cc mingw-w64-x86_64-autotools
build_dir: build-MinGW-x64
install_dir: libusb-MinGW-x64
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v6
with:
# Full history + tags for build-aux/gen-describe.sh.
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: ${{ matrix.packages }}
- name: bootstrap
run: ./bootstrap.sh
- name: Build, test and install
# GCC on MSYS2 doesn't have ASAN support (but Clang does).
run: >-
workspace=$(cygpath -u "$GITHUB_WORKSPACE") &&
./.private/ci-build.sh
--build-dir ${{ matrix.build_dir }}
--install
--no-asan
--
"--prefix=$workspace/${{ matrix.install_dir }}"
- name: Build with logging disabled
if: ${{ matrix.msystem == 'MINGW64' }}
run: ./.private/ci-build.sh --build-dir ${{ matrix.build_dir }}-nolog --no-asan -- --disable-log
- name: Upload installed tree
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.install_dir }}
path: ${{ matrix.install_dir }}
if-no-files-found: error
# The autotools test driver buffers each test's output into its own
# tests/<test>.log; keep them (and config.log) when something goes wrong.
- name: Upload test logs
uses: actions/upload-artifact@v7
if: failure() || cancelled()
with:
name: test-logs-${{ matrix.msystem }}
path: |
build*/config.log
build*/tests/*.log
if-no-files-found: ignore