From 1ea49db716232307b938e44073be8c2bd6799123 Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 10:36:15 -0800 Subject: [PATCH 1/7] specify ubuntu version --- .github/workflows/build.yml | 8 +++++++- README.md | 2 +- .../kotlin/co/touchlab/sqliter/interop/SQLiteException.kt | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e5c4023..a50fb972 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - os: [ macOS-latest ] + os: [ macOS-latest, ubuntu-20.04 ] # os: [ macOS-latest, ubuntu-18.04 ] GitHub actions removed ubuntu-18.04 # os: [ macOS-latest, windows-latest, ubuntu-18.04 ] runs-on: ${{matrix.os}} @@ -53,6 +53,12 @@ jobs: run: | echo "c:\msys64\mingw64\bin" >> $GITHUB_PATH + - name: Run script file + run: | + ls -l /usr/lib/x86_64-linux-gnu/ + sqlite3 --version + shell: bash + - name: Build run: ./gradlew build --no-daemon --stacktrace env: diff --git a/README.md b/README.md index 23111c71..72d73e6e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ SQLiter is designed to serve as a driver to power user-friendly libraries rather ``` dependencies { - implementation("co.touchlab:sqliter-driver:$version") + implementation("co.touchlab:sqliter:$version") } ``` diff --git a/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt b/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt index 1ea20cd7..a014b5f6 100644 --- a/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt +++ b/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt @@ -1,6 +1,6 @@ package co.touchlab.sqliter.interop -open class SQLiteException internal constructor(message: String, private val config: SqliteDatabaseConfig) : Exception(message) +open class SQLiteException internal constructor(message: String, internal val config: SqliteDatabaseConfig) : Exception(message) class SQLiteExceptionErrorCode internal constructor(message: String, config: SqliteDatabaseConfig, private val errorCode: Int) : SQLiteException(message, config) { val errorType: SqliteErrorType by lazy { @@ -8,6 +8,9 @@ class SQLiteExceptionErrorCode internal constructor(message: String, config: Sql SqliteErrorType.values().find { it.code == checkErrorCode } ?: throw IllegalArgumentException("Unknown errorCode $errorCode, checkErrorCode $checkErrorCode") } + override fun toString(): String { + return "SQLiteExceptionErrorCode(message=$message, errorCode=$errorCode, config=$config)" + } } internal inline fun sqlException(logging: Logger, config: SqliteDatabaseConfig, message: String, errorCode: Int = -1): SQLiteException { From d49e390b89d05b83995c17421184922a62994b19 Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 10:37:32 -0800 Subject: [PATCH 2/7] testing remove macos --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a50fb972..073bcebe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - os: [ macOS-latest, ubuntu-20.04 ] + os: [ ubuntu-20.04 ] # os: [ macOS-latest, ubuntu-18.04 ] GitHub actions removed ubuntu-18.04 # os: [ macOS-latest, windows-latest, ubuntu-18.04 ] runs-on: ${{matrix.os}} From 97fd2f6f5daa2b33b16bba8f68b956f89732eeaf Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 10:48:24 -0800 Subject: [PATCH 3/7] also try with 22.04 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 073bcebe..cb5c7e8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] # os: [ macOS-latest, ubuntu-18.04 ] GitHub actions removed ubuntu-18.04 # os: [ macOS-latest, windows-latest, ubuntu-18.04 ] runs-on: ${{matrix.os}} From ff883439e796fad643f812ffe43121dc5ac26c9f Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 11:56:17 -0800 Subject: [PATCH 4/7] remove debug step --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb5c7e8d..7a889cd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - os: [ ubuntu-22.04 ] + os: [ macOS-latest, ubuntu-22.04 ] # os: [ macOS-latest, ubuntu-18.04 ] GitHub actions removed ubuntu-18.04 # os: [ macOS-latest, windows-latest, ubuntu-18.04 ] runs-on: ${{matrix.os}} @@ -53,12 +53,6 @@ jobs: run: | echo "c:\msys64\mingw64\bin" >> $GITHUB_PATH - - name: Run script file - run: | - ls -l /usr/lib/x86_64-linux-gnu/ - sqlite3 --version - shell: bash - - name: Build run: ./gradlew build --no-daemon --stacktrace env: From bd1706dd0c08b5ef22b355b27bc8e2738fb2effa Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 12:05:17 -0800 Subject: [PATCH 5/7] configure JDK --- .github/workflows/build.yml | 6 +++++- sqliter-driver/build.gradle.kts | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a889cd1..416a5bd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,13 +13,17 @@ jobs: strategy: matrix: os: [ macOS-latest, ubuntu-22.04 ] -# os: [ macOS-latest, ubuntu-18.04 ] GitHub actions removed ubuntu-18.04 # os: [ macOS-latest, windows-latest, ubuntu-18.04 ] runs-on: ${{matrix.os}} steps: - name: Checkout the repo uses: actions/checkout@v2 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - name: Install msys2 if: matrix.os == 'windows-latest' uses: msys2/setup-msys2@v2 diff --git a/sqliter-driver/build.gradle.kts b/sqliter-driver/build.gradle.kts index 3c54a9cb..fc436707 100644 --- a/sqliter-driver/build.gradle.kts +++ b/sqliter-driver/build.gradle.kts @@ -33,9 +33,7 @@ fun configInterop(target: org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTar kotlin { jvmToolchain(11) -} -kotlin { val knTargets = listOf( macosX64(), iosX64(), From ef916c4b2e902f516edf5bbfb785ebff4a6de785 Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 12:13:38 -0800 Subject: [PATCH 6/7] add windows back --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 416a5bd7..45de4e3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,8 +12,7 @@ jobs: build: strategy: matrix: - os: [ macOS-latest, ubuntu-22.04 ] -# os: [ macOS-latest, windows-latest, ubuntu-18.04 ] + os: [ macOS-latest, windows-latest, ubuntu-22.04 ] runs-on: ${{matrix.os}} steps: - name: Checkout the repo From 152f32f837cf323b17b94e6e2e021c9a1d8f86aa Mon Sep 17 00:00:00 2001 From: Harold Martin Date: Mon, 6 Nov 2023 12:26:40 -0800 Subject: [PATCH 7/7] revert coord in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72d73e6e..23111c71 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ SQLiter is designed to serve as a driver to power user-friendly libraries rather ``` dependencies { - implementation("co.touchlab:sqliter:$version") + implementation("co.touchlab:sqliter-driver:$version") } ```