Skip to content

[INFRA] test win32 example builds #1

[INFRA] test win32 example builds

[INFRA] test win32 example builds #1

name: Compile and Run nostdlib examples
on: [push, pull_request]
jobs:
windows:
strategy:
matrix:
cc: [gcc]
os: [windows-latest]
example: [win32_hello_world, win32_hello_cli]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Compile ${{ matrix.example }}
run: ${{ matrix.cc }} -s -O2 -mconsole -march=native -mtune=native -std=c89 -pedantic -nodefaultlibs -nostdlib -mno-stack-arg-probe -Xlinker /STACK:0x100000,0x100000 -fno-builtin -ffreestanding -fno-asynchronous-unwind-tables -fuse-ld=lld -Wall -Wextra -Werror -Wvla -Wconversion -Wdouble-promotion -Wmissing-field-initializers -Wuninitialized -Winit-self -Wunused -Wunused-macros -Wunused-local-typedefs ${{ matrix.example }}.c -o ${{ matrix.example }}_${{ matrix.cc }}.exe -lkernel32
- name: Run ${{ matrix.example }}
run: .\${{ matrix.example }}_${{ matrix.cc }}.exe
- name: Upload ${{ matrix.example }} Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.example }}
path: ${{ matrix.example }}_${{ matrix.cc }}.exe