Repository navigation
59 lines (53 loc) · 2.79 KB
/
Copy pathmain.yml
File metadata and controls
59 lines (53 loc) · 2.79 KB
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
name: main
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
check-headers:
# PRs from branches of this repository are already tested by the push event
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
name: Check headers
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v7
- name: Install pcre2grep
run: sudo apt-get update && sudo apt-get install -y pcre2-utils
- run: |
# macros in public headers must use the global namespace to qualify types
! pcre2grep --buffer-size=1M --recursive --multiline --line-number --include='.*\.h$' \
'#define\s+(?:.*\\\r?\n)*.*?\K(?<!:)\b(Enum|String|StringOffset|Array|ArrayClassID|Math|Math_obj|Void|null|Dynamic|hx::|cpp::)\b' \
include
name: Check public headers
- run: |
# clang loses track of #pragma once headers when it reuses a cached PCH whose headers have
# newer modification times (llvm/llvm-project#239569), so use include guards instead
! grep --recursive --line-number --extended-regexp '^\s*#\s*pragma\s+once' include src test
name: Check for pragma once
Test:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
platform: [ Windows32, Windows64, WindowsArm64, MacOS64, MacOSArm, Linux32, Linux64, LinuxArm64 ]
haxe: [ 4.3.7, latest ]
exclude:
- platform: LinuxArm64 # 4.3.7 doesn't have a linux arm build
haxe: 4.3.7
include:
- { platform: Windows32, name: Windows (32bit), arch: 32, ext: .dll, os: windows-latest }
- { platform: Windows64, name: Windows (64bit), arch: 64, ext: .dll, os: windows-latest }
- { platform: WindowsArm64, name: Windows (Arm64), arch: Arm64, ext: .dll, os: windows-11-arm }
- { platform: MacOS64, name: MacOS (x86_64), arch: 64, ext: .dylib, os: macos-15-intel }
- { platform: MacOSArm, name: MacOS (Arm64), arch: Arm64, ext: .dylib, os: macos-latest }
- { platform: Linux32, name: Linux (32bit), arch: 32, ext: .dso, os: ubuntu-latest }
- { platform: Linux64, name: Linux (64bit), arch: 64, ext: .dso, os: ubuntu-latest }
- { platform: LinuxArm64, name: Linux (Arm64), arch: Arm64, ext: .dso, os: ubuntu-24.04-arm }
uses: ./.github/workflows/test.yml
name: Test ${{ matrix.name }} (${{ matrix.haxe }})
with:
haxe: ${{ matrix.haxe }}
arch: ${{ matrix.arch }}
ext: ${{ matrix.ext }}
os: ${{ matrix.os }}