File tree Expand file tree Collapse file tree 3 files changed +54
-18
lines changed
Expand file tree Collapse file tree 3 files changed +54
-18
lines changed Original file line number Diff line number Diff line change 2121 include :
2222 - os : windows-latest
2323 - os : ubuntu-22.04
24+ artifact-name : linux-x64-binaries
25+ - os : ubuntu-22.04-arm
26+ artifact-name : linux-arm64-binaries
2427
2528 runs-on : ${{ matrix.os }}
2629
5760 if : runner.os == 'Linux'
5861 uses : actions/upload-artifact@v4
5962 with :
60- name : linux-x64-binaries
63+ name : ${{ matrix.artifact-name }}
6164 path : build/libOdbcFb.so
Original file line number Diff line number Diff line change @@ -137,3 +137,45 @@ jobs:
137137 with :
138138 files : |
139139 firebird-odbc-driver-${{ needs.release.outputs.version }}-linux-x64.tar.gz
140+
141+ package-linux-arm64 :
142+ needs : [build-and-test, release]
143+ runs-on : ubuntu-latest
144+
145+ steps :
146+ - uses : actions/checkout@v4
147+ with :
148+ sparse-checkout : README.md
149+
150+ - name : Download Linux arm64 artifacts
151+ uses : actions/download-artifact@v4
152+ with :
153+ name : linux-arm64-binaries
154+ path : artifacts
155+
156+ - name : Package Linux arm64 build
157+ run : |
158+ version="${{ needs.release.outputs.version }}"
159+ packageDir="package-linux-arm64"
160+ mkdir -p "$packageDir"
161+
162+ cp artifacts/libOdbcFb.so "$packageDir/"
163+
164+ cp README.md "$packageDir/" 2>/dev/null || true
165+
166+ cat > "$packageDir/odbcinst.ini.sample" << 'EOF'
167+ [Firebird ODBC Driver]
168+ Description = Firebird ODBC Driver
169+ Driver = /usr/local/lib/odbc/libOdbcFb.so
170+ Setup = /usr/local/lib/odbc/libOdbcFb.so
171+ FileUsage = 1
172+ EOF
173+
174+ cd "$packageDir"
175+ tar -czf "../firebird-odbc-driver-${version}-linux-arm64.tar.gz" *
176+
177+ - name : Upload release assets
178+ uses : softprops/action-gh-release@v2
179+ with :
180+ files : |
181+ firebird-odbc-driver-${{ needs.release.outputs.version }}-linux-arm64.tar.gz
Original file line number Diff line number Diff line change @@ -241,37 +241,28 @@ function Uninstall-WindowsDriver {
241241# region Linux
242242
243243function Install-LinuxDriver {
244- if (-not (Get-Command odbcinst - ErrorAction Ignore)) {
245- throw ' odbcinst not found. Install unixODBC: sudo apt-get install unixodbc'
246- }
247-
248244 $driverAbsPath = (Resolve-Path $DriverPath ).Path
245+ $iniFile = Join-Path $BuildDir ' odbc_driver.ini'
249246
250- $tempIni = [System.IO.Path ]::GetTempFileName()
251- try {
252- @"
247+ @"
253248[$DriverName ]
254249Description = $DriverName
255250Driver = $driverAbsPath
256251Setup = $driverAbsPath
257252Threading = 0
258253FileUsage = 0
259- "@ | Set-Content - Path $tempIni
254+ "@ | Set-Content - Path $iniFile
260255
261- exec { sudo odbcinst - i - d -f $tempIni - r }
262- } finally {
263- Remove-Item - Path $tempIni - Force - ErrorAction SilentlyContinue
264- }
256+ # Write driver registration directly to /etc/odbcinst.ini.
257+ # Bypasses the odbcinst CLI tool which is unreliable on arm64 runners
258+ # (sudo's secure_path may not include /usr/bin).
259+ exec { bash - c " sudo cp ' $iniFile ' /etc/odbcinst.ini " }
265260
266261 print Green " Driver '$DriverName ' registered: $driverAbsPath "
267262}
268263
269264function Uninstall-LinuxDriver {
270- if (-not (Get-Command odbcinst - ErrorAction Ignore)) {
271- throw ' odbcinst not found. Install unixODBC: sudo apt-get install unixodbc'
272- }
273-
274- exec { odbcinst - u - d - n $DriverName }
265+ exec { bash - c " sudo rm -f /etc/odbcinst.ini" }
275266
276267 print Green " Driver '$DriverName ' unregistered."
277268}
You can’t perform that action at this time.
0 commit comments