-
-
Notifications
You must be signed in to change notification settings - Fork 813
Updated Fixes for the Linux version of GRDB #1825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thinkpractice
wants to merge
34
commits into
groue:development
Choose a base branch
from
thinkpractice:grdb_linux_changes
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
0526853
Fixed some linker errors caused by WAL absence on Linux.
2d6fe17
Import Foundation for CGFloat on non-Darwin platforms
7477e1c
Removed the `#if !os(Linux)` compiler directive in the `Decimal` exte…
e758fde
Removed #if !os(Linux) in NSString.swift, NSData.swift and Date.swift.
14f60ad
Fixed fromDatabaseValue build under non-Darwin platforms
dc7d47c
Fixed databaseValue build for non-Darwin platforms.
8e5b9ca
Fixed UUID fromDatabaseValue for non-Darwin platforms
c7f1dd7
Fixed import in CGFloatTests.swift to work under non-Darwin platforms.
6912075
Ignore FailureTestCase.swift entirely on non-Darwin platforms for now.
dd90fe6
Ignore ValueObservationRecorderTests.swift on non-Darwin platforms.
2ad2d20
Fixed the unit tests in DatabasePoolConcurrencyTests.
5513eab
Fixed the tests in DatabaseQueueTests.swift
2f10850
Fixed DatabaseSnapshotTests on non-darwin platforms
6518610
Integrated upstream changes.
a212bf9
It should be canImport(Darwin) not os(Darwin)
389c3e0
Use #if !canImport(Combine) per test case (as done by @marcprux) and …
d7cf0f9
NSError bridging is not available, or doesn't work the same on non-Da…
3dd3bbf
vscode config
85d39e6
Merge remote-tracking branch 'upstream/development' into grdb_linux_c…
5db6c36
Added a ci for ubuntu
c3c0275
Added the grdb_linux_changes branch to test the github actions for ub…
7e3d68a
swift 6.2.0 is apparently not available for setup-swift@v2
46fdfa8
Added a batch for the linux build. Now for the grdb_linux_changes bra…
dd41816
Renamed Ubuntu Linux CI to Linux CI and point the badge to the correc…
7775237
See if we can install swift via swiftly
8aaf0a6
Small change
6a2c9b5
Check whether this works
e7850f9
Removed -v flag to silence the warnings a bit
be47b71
Added fail-fast false to see whether the linker completes
a5283f5
Try to silence swiftly prompt
1e39d94
Fixed caching path for swiftly
5ba2087
Use 6.1 instead of 6.1.0 to use the latest available 6.1 version with…
3c98b5f
Check if matrix.os helps in caching swiftly.
492dbeb
Changed cancel-in-progress to false based on a comment by @marcprux
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md | ||
|
|
||
| name: "Linux CI" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - development | ||
| - grdb_linux_changes | ||
| paths: | ||
| - 'GRDB/**' | ||
| - 'Tests/**' | ||
| - '.github/workflows/**' | ||
| - 'Makefile' | ||
| - 'Package.swift' | ||
| - 'SQLiteCustom/src' | ||
| pull_request: | ||
| paths: | ||
| - 'GRDB/**' | ||
| - 'Tests/**' | ||
| - '.github/workflows/**' | ||
| - 'Makefile' | ||
| - 'Package.swift' | ||
| - 'SQLiteCustom/src' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.ref_name }} | ||
| cancel-in-progress: false | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-and-test-on-linux: | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| swift: ["6.2", "6.1"] | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install Swift Dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| binutils \ | ||
| git \ | ||
| gnupg2 \ | ||
| libc6-dev \ | ||
| libcurl4-openssl-dev \ | ||
| libedit2 \ | ||
| libgcc-13-dev \ | ||
| libpython3-dev \ | ||
| libsqlite3-0 \ | ||
| libstdc++-13-dev \ | ||
| libxml2-dev \ | ||
| libz3-dev \ | ||
| pkg-config \ | ||
| python3-lldb \ | ||
| tzdata \ | ||
| unzip \ | ||
| zip \ | ||
| zlib1g-dev \ | ||
| wget \ | ||
| curl \ | ||
| ca-certificates \ | ||
| util-linux | ||
|
|
||
| - name: Cache Swiftly toolchains | ||
| id: cache-swiftly | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly} | ||
| key: swiftly-${{ matrix.os }}-${{ matrix.swift }} | ||
|
|
||
| - name: Install Swift Using Swiftly | ||
| if: steps.cache-swiftly.outputs.cache-hit != 'true' | ||
| run: | | ||
| curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz | ||
| tar zxf swiftly-$(uname -m).tar.gz | ||
| ./swiftly init --quiet-shell-followup -y --skip-install | ||
| . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" | ||
| hash -r | ||
| swiftly install ${{ matrix.swift }} --assume-yes --use | ||
| . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" | ||
|
|
||
| - name: Build SPM Package | ||
| run: | | ||
| swift build -c release | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| swift test -c release | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
groue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "editor.formatOnSave": false, | ||
| "editor.insertSpaces": true, | ||
| "editor.tabSize": 4, | ||
| "editor.detectIndentation": false, | ||
| "editor.trimAutoWhitespace": false | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could alternatively just use
uses: swift-actions/setup-swift@nextas per swift-actions/setup-swift#710. I've been using it in other actions, and it seems quite stable.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did use
setup-swift@v2before but that didn't supportswift 6.2. Also, it threw some random errors with thegpgverification (?) ofswift, which made the pipeline fail. UPDATE apparently thisgpgissue is also mentioned here, i.e. "Investigate GPG issues on linux". That's why I decided to add theswiftlycode myself. I agree it would be better to use thesetup-swiftaction in the future. I guess then@nextselects the latestv3version that usesswiftlyas well? I saw on its PR that it's not yet merged into main right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh and I saw there's a possibility to
cachetheswiftlyinstall but it seems with the current code it doesn't do anything. Not sure whether the path I added (${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}) is evaluated correctly or whether it's an issue with thecacheaction itself. @marcprux, @groue does any of you have some experience with this?