Skip to content

Commit 1b1cdf8

Browse files
committed
New GitHub Actions workflows for build and release processes.
- Adds build.yml (for builds after pushes/PR). - Updates release.yml to run only on official repository. - Updates README.md build status badges.
1 parent ac09f15 commit 1b1cdf8

3 files changed

Lines changed: 145 additions & 17 deletions

File tree

.github/workflows/build.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ "**" ] # All branches, including forks
6+
pull_request:
7+
branches: [ "**" ] # All pull requests
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
# Build Windows binaries
14+
build-windows:
15+
runs-on: ${{ matrix.runner }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- arch: x86
21+
platform: Win32
22+
runner: windows-latest
23+
- arch: x64
24+
platform: x64
25+
runner: windows-latest
26+
# Uncomment when ARM64 runners are available
27+
# - arch: arm64
28+
# platform: ARM64
29+
# runner: windows-11-arm
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Setup MSBuild
35+
uses: microsoft/setup-msbuild@v2
36+
37+
- name: Restore NuGet packages
38+
run: nuget restore ./Builds/MsVc2022.win/OdbcFb.sln
39+
40+
- name: Build ${{ matrix.arch }}
41+
run: |
42+
msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} ./Builds/MsVc2022.win/OdbcFb.sln
43+
44+
# - name: Run tests (${{ matrix.arch }})
45+
# run: |
46+
# echo "Tests would run here for ${{ matrix.arch }}"
47+
48+
- name: Upload ${{ matrix.arch }} binaries
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: firebird-odbc-win-${{ matrix.arch }}-build
52+
path: |
53+
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.dll
54+
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.lib
55+
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.pdb
56+
if-no-files-found: error
57+
58+
# Build Linux binaries
59+
build-linux:
60+
runs-on: ${{ matrix.runner }}
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
include:
65+
- arch: x64
66+
runner: ubuntu-latest
67+
- arch: arm64
68+
runner: ubuntu-22.04-arm
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- name: Build Linux ${{ matrix.arch }}
73+
run: |
74+
# Install dependencies (unixodbc)
75+
sudo apt-get update -y
76+
sudo apt-get install -y unixodbc unixodbc-dev build-essential
77+
78+
# Build ODBC driver
79+
cd Builds/Gcc.lin
80+
cp makefile.linux makefile
81+
make
82+
83+
# - name: Run tests (${{ matrix.arch }})
84+
# run: |
85+
# echo "Tests would run here for ${{ matrix.arch }}"
86+
87+
- name: Upload Linux ${{ matrix.arch }} build artifacts
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: firebird-odbc-linux-${{ matrix.arch }}-build
91+
path: Builds/Gcc.lin/Release_*/libOdbcFb.so
92+
if-no-files-found: error
93+
94+
# Summary job to provide clear CI status
95+
build-summary:
96+
needs: [build-windows, build-linux]
97+
runs-on: ubuntu-latest
98+
if: always()
99+
steps:
100+
- name: Build Summary
101+
run: |
102+
echo "## Build Results" >> $GITHUB_STEP_SUMMARY
103+
echo "" >> $GITHUB_STEP_SUMMARY
104+
105+
if [[ "${{ needs.build-windows.result }}" == "success" ]]; then
106+
echo "✅ Windows builds: **PASSED**" >> $GITHUB_STEP_SUMMARY
107+
else
108+
echo "❌ Windows builds: **FAILED**" >> $GITHUB_STEP_SUMMARY
109+
fi
110+
111+
if [[ "${{ needs.build-linux.result }}" == "success" ]]; then
112+
echo "✅ Linux builds: **PASSED**" >> $GITHUB_STEP_SUMMARY
113+
else
114+
echo "❌ Linux builds: **FAILED**" >> $GITHUB_STEP_SUMMARY
115+
fi
116+
117+
echo "" >> $GITHUB_STEP_SUMMARY
118+
echo "Build completed for commit: \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY

.github/workflows/release.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release
1+
name: Release
22

33
on:
44
push:
@@ -9,8 +9,9 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
# Stage 1: Build Windows binaries (matrix strategy)
12+
# Stage 1: Build Windows binaries
1313
build-windows:
14+
if: ${{ github.repository == 'FirebirdSQL/firebird-odbc-driver' }}
1415
runs-on: ${{ matrix.runner }}
1516
strategy:
1617
fail-fast: false
@@ -39,10 +40,14 @@ jobs:
3940
run: |
4041
msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} ./Builds/MsVc2022.win/OdbcFb.sln
4142
43+
# - name: Run tests (${{ matrix.arch }})
44+
# run: |
45+
# echo "Tests would run here for ${{ matrix.arch }}"
46+
4247
- name: Upload ${{ matrix.arch }} binaries
4348
uses: actions/upload-artifact@v4
4449
with:
45-
name: firebird-odbc-win-${{ matrix.arch }}-binaries
50+
name: firebird-odbc-win-${{ matrix.arch }}-release
4651
path: |
4752
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.dll
4853
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.lib
@@ -71,17 +76,17 @@ jobs:
7176
# Create folders
7277
New-Item -ItemType Directory -Force -Path "package"
7378
New-Item -ItemType Directory -Force -Path "package-debug"
74-
79+
7580
# Copy binaries
7681
Copy-Item "binaries/*" "package/" -Recurse -Exclude "*.pdb"
7782
Copy-Item "binaries/*" "package-debug/" -Recurse
78-
83+
7984
# Copy documentation
8085
Copy-Item "Install/Win32/Readme.txt" "package/"
8186
Copy-Item "Install/IDPLicense.txt" "package/"
8287
Copy-Item "Install/Win32/Readme.txt" "package-debug/"
8388
Copy-Item "Install/IDPLicense.txt" "package-debug/"
84-
89+
8590
# Create zip files
8691
Compress-Archive -Path "package/*" -DestinationPath "firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}.zip"
8792
Compress-Archive -Path "package-debug/*" -DestinationPath "firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}-with-debug-symbols.zip"
@@ -146,17 +151,17 @@ jobs:
146151
cd Install/Win32
147152
$hhcPath = "C:/Program Files (x86)/HTML Help Workshop/hhc.exe"
148153
Write-Host "Compiling help file '../HtmlHelp/OdbcJdbc.hhp' using $hhcPath..."
149-
154+
150155
# HTML Help Compiler returns exit code 1 even on success, so we need to handle this.
151-
156+
152157
# Run the HTML Help Compiler and capture the result
153158
$result = & $hhcPath "../HtmlHelp/OdbcJdbc.hhp" 2>&1
154159
$hhcExitCode = $LASTEXITCODE
155-
160+
156161
Write-Host "HTML Help Compiler output:"
157162
Write-Host $result
158163
Write-Host "HTML Help Compiler exit code: $hhcExitCode"
159-
164+
160165
# Check if the compilation was successful by verifying the output file exists
161166
$chmFile = "../HtmlHelp/FirebirdODBC.chm"
162167
if (Test-Path $chmFile) {
@@ -171,9 +176,9 @@ jobs:
171176
- name: Compile Inno Setup Script (${{ matrix.arch }})
172177
run: |
173178
cd Install/Win32
174-
179+
175180
$finalInstallerBaseName = "firebird-odbc-windows-${{ matrix.arch }}-installer-${{ github.ref_name }}"
176-
181+
177182
$appVersion = "${{ github.ref_name }}"
178183
$platformDefine = "${{ matrix.platform }}"
179184
@@ -197,6 +202,7 @@ jobs:
197202
if-no-files-found: error
198203

199204
build-linux:
205+
if: ${{ github.repository == 'FirebirdSQL/firebird-odbc-driver' }}
200206
runs-on: ${{ matrix.runner }}
201207
strategy:
202208
fail-fast: false

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ All the new features and fixes are documented here -
1313
* [ChangeLog](https://raw.githubusercontent.com/FirebirdSQL/firebird-odbc-driver/master/ChangeLog_v3.0)
1414

1515
## Downloads
16-
The latest build artifacts:
17-
* [Windows installation package](https://github.com/user-attachments/files/19207749/win_installers.zip) [![MSBuild](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/msbuild.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/msbuild.yml)
18-
* [Linux x86-64](https://github.com/user-attachments/files/19207739/linux_libs.zip) [![Linux](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/linux.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/linux.yml)
19-
* [Linux_ARM64](https://github.com/user-attachments/files/19210460/linux_arm64_libs.zip) [![RaspberryPI](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/rpi_arm64.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/rpi_arm64.yml)
2016

21-
You can also download the lastest & archive build packages here: https://github.com/FirebirdSQL/firebird-odbc-driver/wiki
17+
[![Build](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/build.yml/badge.svg)](https://github.com/FirebirdSQL/firebird-odbc-driver/actions/workflows/build.yml)
18+
19+
### Latest Release Packages
20+
Download the latest stable release from the [Releases page](https://github.com/FirebirdSQL/firebird-odbc-driver/releases/latest):
21+
22+
* **Windows**: Installation packages (.exe) and ZIP archives (.zip) for x86 and x64
23+
* **Linux**: TAR.GZ packages (.tar.gz) for x64 and ARM64
24+
25+
You can also find additional build packages and archives here: https://github.com/FirebirdSQL/firebird-odbc-driver/wiki
2226

2327

2428
## Build from sources

0 commit comments

Comments
 (0)