diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 69b4cea7..aceafba0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,8 +4,11 @@ on: push: pull_request: +env: + DOTNET_VERSION: '6.0.428' + jobs: - buildAndTest: + buildAndTestWindows: runs-on: - windows-latest @@ -15,17 +18,67 @@ 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 - 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-windows + path: dist + + buildAndTestLinux: + + runs-on: + - ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - 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: ${{ env.DOTNET_VERSION }} + - 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 + name: dist-macos path: dist 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/.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 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 $@