Skip to content

Commit

Permalink
more changes for Apple silicon builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SingingBush committed Nov 2, 2024
1 parent ba1c34f commit e2e23a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/dub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
## macos-13 is the latest Mac runner with Intel cpu
- { os: macos-13, compiler: dmd-latest }
- { os: macos-13, compiler: ldc-latest }
- { os: macos-13, compiler: dmd-2.102.2 }
- { os: macos-13, compiler: dmd-2.103.1 }
- { os: macos-13, compiler: ldc-1.32.2 }
exclude:
- { os: windows-latest, compiler: dmd-2.098.1 }
Expand All @@ -68,6 +68,14 @@ jobs:
if: startsWith(matrix.os, 'macos')
run: brew bundle

# Seems ODBC is missing on the latest macos runners so install using homebrew
- name: Install ODBC on Mac OSX ${{ runner.arch }}
if: ${{ startsWith(matrix.os, 'macos') && runner.arch == 'ARM64' }}
run: |
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
HOMEBREW_ACCEPT_EULA=Y brew install msodbcsql18 mssql-tools18
# - name: Upgrade dub dependencies
# if: startsWith(matrix.os, 'windows')
# uses: WebFreak001/dub-upgrade@v0.1
Expand All @@ -90,7 +98,7 @@ jobs:
working-directory: example
run: dub build --config=SQLite --arch=x86 && ./ddbctest --connection=sqlite:ddbc-test.sqlite

# Use the default arch (either x86_64 or arm64 all platforms)
# Use the default arch (either x86_64 or aarch64 all platforms)
- name: dub test with full config (${{ runner.arch }})
run: dub test --config=full

Expand Down
9 changes: 6 additions & 3 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
},
"libs-posix": ["sqlite3", "odbc"],
"libs-windows": ["odbc32"],
"lflags-osx": ["-L/usr/local/opt/sqlite3/lib/"],
"lflags-osx-x86_64": ["-L/usr/local/opt/sqlite3/lib/"],
"lflags-osx-aarch64": ["-L/opt/homebrew/opt/sqlite3/lib/"],
"copyFiles-windows-x86": [ "libs/win32/sqlite3.dll", "libs/win32/libpq.dll"],
"copyFiles-windows-x86_64": [ "libs/win64/libpq.dll", "libs/win64/sqlite3.dll"],
"sourceFiles-windows-x86_64" : [ "libs/win64/sqlite3.lib" ],
Expand Down Expand Up @@ -57,7 +58,8 @@
"name": "SQLite",
"versions": ["USE_SQLITE"],
"libs-posix": ["sqlite3"],
"lflags-osx": ["-L/usr/local/opt/sqlite3/lib/"],
"lflags-osx-x86_64": ["-L/usr/local/opt/sqlite3/lib/"],
"lflags-osx-aarch64": ["-L/opt/homebrew/opt/sqlite3/lib/"],
"copyFiles-windows-x86": [ "libs/win32/sqlite3.dll" ],
"copyFiles-windows-x86_64": [ "libs/win64/sqlite3.dll" ],
"sourceFiles-windows-x86_64" : [ "libs/win64/sqlite3.lib" ],
Expand Down Expand Up @@ -110,7 +112,8 @@
},
"libs-posix": ["sqlite3", "pq", "odbc"],
"libs-windows": ["odbc32"],
"lflags-osx": ["-L/usr/local/opt/sqlite3/lib/"],
"lflags-osx-x86_64": ["-L/usr/local/opt/sqlite3/lib/"],
"lflags-osx-aarch64": ["-L/opt/homebrew/opt/sqlite3/lib/"],
"copyFiles-windows-x86": [ "libs/win32/sqlite3.dll" ],
"copyFiles-windows-x86_64": [ "libs/win64/sqlite3.dll" ],
"sourceFiles-windows-x86_64" : [ "libs/win64/sqlite3.lib" ],
Expand Down

0 comments on commit e2e23a2

Please sign in to comment.