Skip to content

Commit ce29ec3

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

File tree

3 files changed

+143
-17
lines changed

3 files changed

+143
-17
lines changed

.github/workflows/build.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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+
- arch: arm64
27+
platform: ARM64
28+
runner: windows-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup MSBuild
33+
uses: microsoft/setup-msbuild@v2
34+
35+
- name: Restore NuGet packages
36+
run: nuget restore ./Builds/MsVc2022.win/OdbcFb.sln
37+
38+
- name: Build ${{ matrix.arch }}
39+
run: |
40+
msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} ./Builds/MsVc2022.win/OdbcFb.sln
41+
42+
# - name: Run tests (${{ matrix.arch }})
43+
# run: |
44+
# echo "Tests would run here for ${{ matrix.arch }}"
45+
46+
- name: Upload ${{ matrix.arch }} binaries
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: firebird-odbc-win-${{ matrix.arch }}-build
50+
path: |
51+
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.dll
52+
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.lib
53+
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.pdb
54+
if-no-files-found: error
55+
56+
# Build Linux binaries
57+
build-linux:
58+
runs-on: ${{ matrix.runner }}
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
include:
63+
- arch: x64
64+
runner: ubuntu-latest
65+
- arch: arm64
66+
runner: ubuntu-22.04-arm
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- name: Build Linux ${{ matrix.arch }}
71+
run: |
72+
# Install dependencies (unixodbc)
73+
sudo apt-get update -y
74+
sudo apt-get install -y unixodbc unixodbc-dev build-essential
75+
76+
# Build ODBC driver
77+
cd Builds/Gcc.lin
78+
cp makefile.linux makefile
79+
make
80+
81+
# - name: Run tests (${{ matrix.arch }})
82+
# run: |
83+
# echo "Tests would run here for ${{ matrix.arch }}"
84+
85+
- name: Upload Linux ${{ matrix.arch }} build artifacts
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: firebird-odbc-linux-${{ matrix.arch }}-build
89+
path: Builds/Gcc.lin/Release_*/libOdbcFb.so
90+
if-no-files-found: error
91+
92+
# Summary job to provide clear CI status
93+
build-summary:
94+
needs: [build-windows, build-linux]
95+
runs-on: ubuntu-latest
96+
if: always()
97+
steps:
98+
- name: Build Summary
99+
run: |
100+
echo "## Build Results" >> $GITHUB_STEP_SUMMARY
101+
echo "" >> $GITHUB_STEP_SUMMARY
102+
103+
if [[ "${{ needs.build-windows.result }}" == "success" ]]; then
104+
echo "✅ Windows builds: **PASSED**" >> $GITHUB_STEP_SUMMARY
105+
else
106+
echo "❌ Windows builds: **FAILED**" >> $GITHUB_STEP_SUMMARY
107+
fi
108+
109+
if [[ "${{ needs.build-linux.result }}" == "success" ]]; then
110+
echo "✅ Linux builds: **PASSED**" >> $GITHUB_STEP_SUMMARY
111+
else
112+
echo "❌ Linux builds: **FAILED**" >> $GITHUB_STEP_SUMMARY
113+
fi
114+
115+
echo "" >> $GITHUB_STEP_SUMMARY
116+
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
@@ -38,10 +39,14 @@ jobs:
3839
run: |
3940
msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.platform }} ./Builds/MsVc2022.win/OdbcFb.sln
4041
42+
# - name: Run tests (${{ matrix.arch }})
43+
# run: |
44+
# echo "Tests would run here for ${{ matrix.arch }}"
45+
4146
- name: Upload ${{ matrix.arch }} binaries
4247
uses: actions/upload-artifact@v4
4348
with:
44-
name: firebird-odbc-win-${{ matrix.arch }}-binaries
49+
name: firebird-odbc-win-${{ matrix.arch }}-release
4550
path: |
4651
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.dll
4752
Builds/MsVc2022.win/${{ matrix.platform }}/Release/*.lib
@@ -70,17 +75,17 @@ jobs:
7075
# Create folders
7176
New-Item -ItemType Directory -Force -Path "package"
7277
New-Item -ItemType Directory -Force -Path "package-debug"
73-
78+
7479
# Copy binaries
7580
Copy-Item "binaries/*" "package/" -Recurse -Exclude "*.pdb"
7681
Copy-Item "binaries/*" "package-debug/" -Recurse
77-
82+
7883
# Copy documentation
7984
Copy-Item "Install/Win32/Readme.txt" "package/"
8085
Copy-Item "Install/IDPLicense.txt" "package/"
8186
Copy-Item "Install/Win32/Readme.txt" "package-debug/"
8287
Copy-Item "Install/IDPLicense.txt" "package-debug/"
83-
88+
8489
# Create zip files
8590
Compress-Archive -Path "package/*" -DestinationPath "firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}.zip"
8691
Compress-Archive -Path "package-debug/*" -DestinationPath "firebird-odbc-windows-${{ matrix.arch }}-${{ github.ref_name }}-with-debug-symbols.zip"
@@ -147,17 +152,17 @@ jobs:
147152
cd Install/Win32
148153
$hhcPath = "C:/Program Files (x86)/HTML Help Workshop/hhc.exe"
149154
Write-Host "Compiling help file '../HtmlHelp/OdbcJdbc.hhp' using $hhcPath..."
150-
155+
151156
# HTML Help Compiler returns exit code 1 even on success, so we need to handle this.
152-
157+
153158
# Run the HTML Help Compiler and capture the result
154159
$result = & $hhcPath "../HtmlHelp/OdbcJdbc.hhp" 2>&1
155160
$hhcExitCode = $LASTEXITCODE
156-
161+
157162
Write-Host "HTML Help Compiler output:"
158163
Write-Host $result
159164
Write-Host "HTML Help Compiler exit code: $hhcExitCode"
160-
165+
161166
# Check if the compilation was successful by verifying the output file exists
162167
$chmFile = "../HtmlHelp/FirebirdODBC.chm"
163168
if (Test-Path $chmFile) {
@@ -172,9 +177,9 @@ jobs:
172177
- name: Compile Inno Setup Script (${{ matrix.arch }})
173178
run: |
174179
cd Install/Win32
175-
180+
176181
$finalInstallerBaseName = "firebird-odbc-windows-${{ matrix.arch }}-installer-${{ github.ref_name }}"
177-
182+
178183
$appVersion = "${{ github.ref_name }}"
179184
$platformDefine = "${{ matrix.platform }}"
180185
@@ -198,6 +203,7 @@ jobs:
198203
if-no-files-found: error
199204

200205
build-linux:
206+
if: ${{ github.repository == 'FirebirdSQL/firebird-odbc-driver' }}
201207
runs-on: ${{ matrix.runner }}
202208
strategy:
203209
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)