-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
base: development
Are you sure you want to change the base?
Changes from all commits
0526853
2d6fe17
7477e1c
e758fde
14f60ad
dc7d47c
8e5b9ca
c7f1dd7
6912075
dd90fe6
2ad2d20
5513eab
2f10850
6518610
a212bf9
389c3e0
d7cf0f9
3dd3bbf
85d39e6
5db6c36
c3c0275
7e3d68a
46fdfa8
dd41816
7775237
8aaf0a6
6a2c9b5
e7850f9
be47b71
a5283f5
1e39d94
5ba2087
3c98b5f
492dbeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You might want to .gitignore this file, depending on whether @groue wants it added to the repo or not.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @groue I think we decided to keep this in the repo to prevent future issues with vscode formatting, didn't we? Otherwise I'm fine to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, in that case, fine it leave it in. I wasn't following that thread closely. |
||
| "editor.formatOnSave": false, | ||
| "editor.insertSpaces": true, | ||
| "editor.tabSize": 4, | ||
| "editor.detectIndentation": false, | ||
| "editor.trimAutoWhitespace": false | ||
| } | ||
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?