-
-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (64 loc) · 2.22 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.12.0-dev.2818+97290e0bf
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.os == 'windows-latest' }}
with:
arch: x86
- uses: actions/checkout@v4
if: ${{ matrix.os == 'windows-latest' }}
with:
repository: 'squeek502/win32-samples-rc-tests'
submodules: true
path: 'win32-samples-rc-tests'
- name: Install qemu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y qemu-user-static
- run: zig version
- run: zig env
- name: Build
run: zig build
- name: Test
run: zig build test
- name: Test 32-bit
if: ${{ matrix.os != 'macos-latest' }}
run: zig build test -Dtarget=x86-native
- name: Test big endian (mips)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: zig build test -Dtarget=mips-native -fqemu
- name: Test big endian (powerpc64)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: zig build test -Dtarget=powerpc64-native -fqemu
- name: Add zig-out to PATH
if: ${{ matrix.os == 'windows-latest' }}
run: Add-Content $env:GITHUB_PATH "$env:GITHUB_WORKSPACE\zig-out\bin"
- name: Setup Win32 Samples
if: ${{ matrix.os == 'windows-latest' }}
working-directory: ./win32-samples-rc-tests
run: .\setup.ps1
- name: Test Win32 Samples
if: ${{ matrix.os == 'windows-latest' }}
working-directory: ./win32-samples-rc-tests
run: .\test.ps1 -ErrorOnAnyDiscrepancies -ErrorOnAnyLikelyPanics -IncludeWin32WillCompileErrorFiles -ExcludeLLVMRC -ExcludeWindres -ExcludeZigRC
- uses: actions/upload-artifact@v4
if: failure()
with:
name: win32-samples-rc-tests-results
path: 'win32-samples-rc-tests/results.log'