-
Notifications
You must be signed in to change notification settings - Fork 19
118 lines (102 loc) · 4.47 KB
/
build-and-test.yml
File metadata and controls
118 lines (102 loc) · 4.47 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Build and Test
on:
push:
# Run on all branches, but not on tags (release.yml handles tags)
branches:
- '**'
tags-ignore:
- '**'
pull_request:
workflow_call:
permissions:
contents: read
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
include:
# ── Windows x64 native ──────────────────────────────────────────────
- os: windows-2022
artifact-name: windows-x64-binaries
firebird-version: '5.0.3'
- os: windows-2022
firebird-branch: master
# ── Windows x86 native (WoW64) ──────────────────────────────────────
- os: windows-2022
artifact-name: windows-x86-binaries
arch: Win32
firebird-version: '5.0.3'
- os: windows-2022
arch: Win32
firebird-branch: master
# ── Windows ARM64 native ─────────────────────────────────────────────
# Official Firebird releases have no win-arm64 binaries; snapshots do.
- os: windows-11-arm
artifact-name: windows-arm64-binaries
firebird-branch: master
# ── Linux x64 native ─────────────────────────────────────────────────
- os: ubuntu-22.04
artifact-name: linux-x64-binaries
firebird-version: '5.0.3'
- os: ubuntu-22.04
firebird-branch: master
# ── Linux ARM64 native ──────────────────────────────────────────────
- os: ubuntu-22.04-arm
artifact-name: linux-arm64-binaries
firebird-version: '5.0.3'
- os: ubuntu-22.04-arm
firebird-branch: master
# ── Linux x64 sanitizers (Debug, Firebird 5.0.3) ─────────────────────
# ASAN is temporarily disabled — re-enable once the Linux widechar
# conversion paths in MainUnicode.cpp are rewritten (#287 Tier 1b,
# draft PR #291). Until then it fails on a heap-buffer-overflow in
# SQLGetDiagRecW.
# - os: ubuntu-22.04
# sanitizer: Asan
# firebird-version: '5.0.3'
- os: ubuntu-22.04
sanitizer: Valgrind
firebird-version: '5.0.3'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history for git-tag-based versioning
- name: Install prerequisites
shell: pwsh
run: ./install-prerequisites.ps1
- name: Install unixODBC (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y unixodbc unixodbc-dev
- name: Install Valgrind
if: matrix.sanitizer == 'Valgrind'
run: sudo apt-get install -y valgrind
- name: Build, install and test
shell: pwsh
env:
API_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FIREBIRD_VERSION: ${{ matrix.firebird-version }}
FIREBIRD_BRANCH: ${{ matrix.firebird-branch }}
run: |
$archArgs = @{}
if ('${{ matrix.arch }}') { $archArgs['Architecture'] = '${{ matrix.arch }}' }
$sanitizerArgs = @{}
if ('${{ matrix.sanitizer }}') { $sanitizerArgs['Sanitizer'] = '${{ matrix.sanitizer }}' }
$config = if ('${{ matrix.sanitizer }}') { 'Debug' } else { 'Release' }
Invoke-Build test -Configuration $config @archArgs @sanitizerArgs -File ./firebird-odbc-driver.build.ps1
- name: Upload artifacts (Windows)
if: runner.os == 'Windows' && matrix.artifact-name
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}
path: |
build/Release/FirebirdODBC.dll
build/Release/FirebirdODBC.lib
build/Release/FirebirdODBC.pdb
- name: Upload artifacts (Linux)
if: runner.os == 'Linux' && matrix.artifact-name
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}
path: build/libOdbcFb.so