-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The VS ecosystem is poorly documented, specially for CI use. Although the old VS CI code worked at some point, the ecosystem moved and broke it. It has been largely rewritten to work in the present day. Cross compilation and UWP testing are missing. Some VS-specific bugs were exposed and fixed: Don't install or test time macros on VS. Fix a warning on msvc.
- Loading branch information
Showing
8 changed files
with
29 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,26 +256,20 @@ jobs: | |
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
cc: [clang, msvc] | ||
api: [win32, uwp] | ||
arch: [aarch64, amd64] | ||
cc: [cl, clang-cl] | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: pip install meson | ||
- run: pip install meson ninja | ||
- uses: actions/[email protected] | ||
- uses: ilammy/[email protected] | ||
- name: build | ||
run: | | ||
if ("${{matrix.api}}" -eq "uwp") { | ||
$uwp = "--cross-file=.github/workflows/meson-vs-uwp.txt" | ||
pwsh -c { | ||
$env:CC="${{ matrix.cc }}"; | ||
# Don't do debug builds because that triggers a Windows bug: | ||
# https://developercommunity.visualstudio.com/t/_setmaxstdio-hangs-the-program-if-the/10164855?space=62&q=setmaxstdio&viewtype=all | ||
meson setup build --buildtype=release -Dtest_system=true | ||
} | ||
if ("${{matrix.arch}}" -eq "aarch64") { | ||
$arm = "--cross-file=.github/workflows/meson-vs-aarch64.txt" | ||
} | ||
# Don't do debug builds because that triggers a Windows bug: | ||
# https://developercommunity.visualstudio.com/t/_setmaxstdio-hangs-the-program-if-the/10164855?space=62&q=setmaxstdio&viewtype=all | ||
meson setup $uwp $arm $build $asan --buildtype=release --backend=vs ` | ||
--cross-file .github/workflows/meson-vs-${{matrix.cc}}.txt ` | ||
-Dtest_system=true build | ||
meson compile -C build | ||
- name: test | ||
run: meson test --no-suite system -C build | ||
|
@@ -284,5 +278,5 @@ jobs: | |
- uses: actions/[email protected] | ||
if: always() | ||
with: | ||
name: meson-logs-vs-${{matrix.cc}}-${{matrix.api}}-${{matrix.arch}} | ||
name: meson-logs-vs-${{matrix.cc}} | ||
path: build/meson-logs |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2023 Guilherme Janczak <[email protected]> | ||
# Copyright (c) 2023-2024 Guilherme Janczak <[email protected]> | ||
# | ||
# Permission to use, copy, modify, and distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
|
@@ -30,13 +30,16 @@ time_macros = [ | |
] | ||
|
||
time_needed = false | ||
foreach macro : time_macros | ||
if not cc.has_header_symbol('sys/time.h', macro, args: args, | ||
dependencies: deps) | ||
time_needed = true | ||
break | ||
endif | ||
endforeach | ||
if cc.has_type('struct timeval', prefix: '#include <sys/time.h>') and \ | ||
cc.has_type('struct timespec', prefix: '#include <time.h>') | ||
foreach macro : time_macros | ||
if not cc.has_header_symbol('sys/time.h', macro, args: args, | ||
dependencies: deps) | ||
time_needed = true | ||
break | ||
endif | ||
endforeach | ||
endif | ||
|
||
time_incdir = [] | ||
time_man = [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2022 Guilherme Janczak <[email protected]> | ||
# Copyright (c) 2022, 2024 Guilherme Janczak <[email protected]> | ||
# | ||
# Permission to use, copy, modify, and distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
|
@@ -23,10 +23,15 @@ tests = [ | |
'arc4random', 'arc4random_buf', 'arc4random_uniform', 'closefrom', 'daemon', | ||
'err', 'errc', 'errx', 'explicit_bzero', 'memrchr', 'freezero', 'getopt', | ||
'getprogname', 'pledge', 'reallocarray', 'recallocarray', 'setproctitle', | ||
'strlcat', 'strlcpy', 'strsep', 'strtonum', 'time-macros', 'unveil', 'warn', | ||
'strlcat', 'strlcpy', 'strsep', 'strtonum', 'unveil', 'warn', | ||
'warnc', 'warnx', | ||
] | ||
|
||
if cc.has_type('struct timeval', prefix: '#include <sys/time.h>') and \ | ||
cc.has_type('struct timespec', prefix: '#include <time.h>') | ||
tests += 'time-macros' | ||
endif | ||
|
||
foreach testname : tests | ||
suite = [] | ||
if syms.contains(testname) | ||
|