Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,23 @@ jobs:
git clone --depth 1 --branch 2026.04.27 https://github.com/microsoft/vcpkg.git "%VCPKG_ROOT%"
call "%VCPKG_ROOT%\bootstrap-vcpkg.bat" -disableMetrics

- name: Cache vcpkg binary packages
uses: actions/cache@v5
# actions/cache@v5's combined restore+save runs save as a post-step
# that is skipped when the job fails. Splitting into restore + save
# lets the cache be persisted even when later steps (build/test)
# fail, so a single broken commit doesn't strand the cache for every
# subsequent main-branch run.
- name: Restore vcpkg binary packages
id: vcpkg-cache
uses: actions/cache/restore@v5
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-windows-v1-2026.04.27-x64-windows-glib
restore-keys: |
vcpkg-windows-v1-2026.04.27-x64-windows-

- name: Cache vcpkg installed tree
uses: actions/cache@v5
- name: Restore vcpkg installed tree
id: vcpkg-installed-cache
uses: actions/cache/restore@v5
with:
path: ${{ env.VCPKG_ROOT }}\installed
key: vcpkg-windows-installed-v1-2026.04.27-x64-windows-glib
Expand All @@ -156,6 +163,22 @@ jobs:
@echo off
"%VCPKG_ROOT%\vcpkg.exe" install glib:x64-windows --x-abi-tools-use-exact-versions

- name: Save vcpkg binary packages
if: steps.vcpkg-cache.outputs.cache-hit != 'true'
continue-on-error: true
uses: actions/cache/save@v5
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}

- name: Save vcpkg installed tree
if: steps.vcpkg-installed-cache.outputs.cache-hit != 'true'
continue-on-error: true
uses: actions/cache/save@v5
with:
path: ${{ env.VCPKG_ROOT }}\installed
key: ${{ steps.vcpkg-installed-cache.outputs.cache-primary-key }}

- name: Configure (clang-cl)
shell: cmd
run: |
Expand Down
13 changes: 10 additions & 3 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@ test('skeleton', test_skeleton, suite : 'unit')
# Normalise to forward slashes; fopen accepts both on every platform.
fixture_dir = meson.current_source_dir().replace('\\', '/') + '/fixtures'

# MSVC's CRT marks fopen() as deprecated in favour of the Annex K *_s
# variants, which are not portable to glibc/musl. Silence the deprecation
# only for this test target so the production library stays unaffected.
# clang-cl uses MSVC argument syntax and inherits the same warning.
test_lexer_args = ['-DWG_FIXTURE_DIR="' + fixture_dir + '"']
if meson.get_compiler('c').get_argument_syntax() == 'msvc'
test_lexer_args += '-D_CRT_SECURE_NO_WARNINGS'
endif

test_lexer = executable('test_lexer',
files(
'test_lexer.c',
'../wiig/lexer/lexer.c',
),
include_directories : [wiig_inc, wiig_src_inc],
c_args : [
'-DWG_FIXTURE_DIR="' + fixture_dir + '"',
],
c_args : test_lexer_args,
dependencies : [glib_dep],
install : false,
)
Expand Down
Loading