From 872300ade9a8c0533be392b5a3ac845479c30d97 Mon Sep 17 00:00:00 2001 From: webwarrior-ws Date: Tue, 11 Nov 2025 09:15:05 +0100 Subject: [PATCH 1/4] GithubCI: added Linux and Mac builds --- .github/workflows/CI.yml | 56 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 69b4cea7..2d8cae2c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - buildAndTest: + buildAndTestWindows: runs-on: - windows-latest @@ -22,10 +22,60 @@ jobs: - name: Upload artifact (bin) uses: actions/upload-artifact@v4 with: - name: bin + name: bin-windows path: bin - name: Upload artifact (dist) uses: actions/upload-artifact@v4 with: - name: dist + name: dist-windows + path: dist + + buildAndTestLinux: + + runs-on: + - ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.428 + - name: Build & Run Tests + run: | + ./build.sh + - name: Upload artifact (bin) + uses: actions/upload-artifact@v4 + with: + name: bin-linux + path: bin + - name: Upload artifact (dist) + uses: actions/upload-artifact@v4 + with: + name: dist-linux + path: dist + + buildAndTestMac: + + runs-on: + - macos-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.428 + - name: Build & Run Tests + run: | + ./build.sh + - name: Upload artifact (bin) + uses: actions/upload-artifact@v4 + with: + name: bin-macos + path: bin + - name: Upload artifact (dist) + uses: actions/upload-artifact@v4 + with: + name: dist-macos path: dist From 2cca85d5c48191801c105d1505d225c24f810e45 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 15 Nov 2025 19:25:38 +0800 Subject: [PATCH 2/4] Rename .paket bootstrap subfolder to fix CI The default case for Mac&Linux builds seemed to be to try to run mono, which these days we can say is an old tech. By renaming this folder we can see that the new versions of .NET (as in .NETCore, which got renamed back again to ".NET" in v5) can build fine. --- {.paket => .paket_netfx}/Paket.Restore.targets | 0 {.paket => .paket_netfx}/paket.exe | Bin README.md | 8 ++++++-- build.cmd | 4 ++++ build.sh | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) rename {.paket => .paket_netfx}/Paket.Restore.targets (100%) rename {.paket => .paket_netfx}/paket.exe (100%) diff --git a/.paket/Paket.Restore.targets b/.paket_netfx/Paket.Restore.targets similarity index 100% rename from .paket/Paket.Restore.targets rename to .paket_netfx/Paket.Restore.targets diff --git a/.paket/paket.exe b/.paket_netfx/paket.exe similarity index 100% rename from .paket/paket.exe rename to .paket_netfx/paket.exe diff --git a/README.md b/README.md index f36f2878..2f66deb4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Join the chat at https://gitter.im/fsprojects/SQLProvider](https://badges.gitter.im/fsprojects/SQLProvider.svg)](https://gitter.im/fsprojects/SQLProvider?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -A general .NET/Mono SQL database type provider. Current features : +A general .NET SQL database type provider. Current features : * LINQ queries * Lazy schema exploration * Automatic constraint navigation @@ -45,9 +45,13 @@ additional samples and documentation! ## Building [![Build status](https://github.com/fsprojects/SQLProvider/actions/workflows/CI.yml/badge.svg?branch=master&event=push)](https://github.com/fsprojects/SQLProvider/actions?query=branch%3Amaster) -* Mono: Run *build.sh* +* Linux/macOS: Run *build.sh* * Windows: Run *build.cmd* +(Note: both scripts above use the `dotnet` command underneath; if you need to build +with .NETFramework v4.x or Mono, rename the '.paket_netfx' to '.paket' first, before +restoring & building manually with paket and msbuild.) + ## Known issues - Database vendors other than SQL Server and Access use dynamic assembly loading. This diff --git a/build.cmd b/build.cmd index ba1844ac..f5c4c0d0 100644 --- a/build.cmd +++ b/build.cmd @@ -1,4 +1,8 @@ @echo off +where /q dotnet +if ERRORLEVEL 1 ( + echo "ERROR: 'dotnet' not found. Please ensure you have installed .NETv6 or newer" && exit /b 1 +) rem change the target via -t, e.g.: rem build -t PackNuget cls diff --git a/build.sh b/build.sh index f6a62c7b..657d8383 100755 --- a/build.sh +++ b/build.sh @@ -3,6 +3,7 @@ if test "$OS" = "Windows_NT" then cmd /C build.cmd else + which dotnet > /dev/null || { echo "ERROR: 'dotnet' not found. Please ensure you have installed .NETv6 or newer" >&2 && exit 1; } dotnet tool restore dotnet paket restore #dotnet fsi build.fsx -t Build $@ From 0c27ed08e588ea25dd4f14e4f97488acbd89a06c Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 15 Nov 2025 20:29:22 +0800 Subject: [PATCH 3/4] GitHubCI: use env var for .NET version This way it doesn't get repeated in each job. --- .github/workflows/CI.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2d8cae2c..aceafba0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,6 +4,9 @@ on: push: pull_request: +env: + DOTNET_VERSION: '6.0.428' + jobs: buildAndTestWindows: @@ -15,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.428 + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build & Run Tests run: | .\build.cmd @@ -40,7 +43,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.428 + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build & Run Tests run: | ./build.sh @@ -65,7 +68,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.428 + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build & Run Tests run: | ./build.sh From 7a86fc34aafd1cf4e14b9ca1c54c13a3474e4ea5 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Sat, 15 Nov 2025 22:44:04 +0800 Subject: [PATCH 4/4] Removed travis settings file As explained in 6cac8d381d1d6d1b7aa6803a89e4e89b85b64fb0 it no longer works. --- .travis.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e68f1439..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: csharp -sudo: required -dist: xenial - -dotnet: 6.0.403 -mono: - - latest # => "stable release" - - alpha - - beta - - weekly # => "latest commits" -os: - - linux - -script: - - ./build.sh - -matrix: - fast_finish: true - allow_failures: - - mono: alpha - - mono: beta - - mono: weekly