diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..ab488a9
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,28 @@
+name: CI
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+jobs:
+ build-test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: "10.0.x"
+
+ - name: Restore
+ run: dotnet restore src/Exceltk/Exceltk.csproj
+
+ - name: Build
+ run: dotnet build src/Exceltk/Exceltk.csproj -c Release --no-restore
+
+ - name: Regression tests
+ working-directory: src
+ run: bash test.sh
diff --git a/.travis.yml b/.travis.yml
index f74ff37..8e32767 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,30 +1,7 @@
-language: csharp
-solution: ./src/exceltk.sln
-
-matrix:
- include:
- - os: linux # Ubuntu 14.04
- dist: trusty
- sudo: required
- dotnet: 2.0.0-preview1-005977
- mono: none
-
-script:
- - dotnet restore src/exceltk.sln
- - dotnet build src/exceltk.sln
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test1.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test2.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test3.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test4.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test5.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test6_crossline.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test7_large_tail_empty_columns.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -xls src/test/test8.xls
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -bhead -xls src/test/test9_formula.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -bhead -xls src/test/test10_bodyhead.xlsx
- - dotnet run --project src/Exceltk/Exceltk.csproj -t md -bhead -xls src/test/test11_form.xls
-
-
-notifications:
- email:
- - fanfeilong@outlook.com
\ No newline at end of file
+# Travis CI is retired for this repo.
+# Continuous integration now runs on GitHub Actions:
+# .github/workflows/ci.yml (.NET 10)
+#
+# To run the same checks locally:
+# dotnet build src/Exceltk/Exceltk.csproj -c Release
+# (cd src && bash test.sh)
diff --git a/.travisconfig.yml b/.travisconfig.yml
deleted file mode 100644
index bc4e5b5..0000000
--- a/.travisconfig.yml
+++ /dev/null
@@ -1,4 +0,0 @@
- - os: osx # OSX 10.11
- osx_image: xcode7.2
- dotnet: 2.0.0-preview1-005977
- mono: none
\ No newline at end of file
diff --git a/README.md b/README.md
index 5df9610..0079bc9 100644
--- a/README.md
+++ b/README.md
@@ -78,7 +78,7 @@ ExcelTk integrated the following projects
# How to build
-Requires [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0).
+Requires [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) (LTS). A `global.json` at the repo root pins SDK 10 with `rollForward: latestMajor`.
Quick check (any OS):
@@ -91,6 +91,8 @@ dotnet run --project src/Exceltk/Exceltk.csproj -c Release -- -t md -xls src/tes
Optional: if `dotnet restore` feels slow because of publish RIDs, you can temporarily remove or comment the `RuntimeIdentifiers` block in `src/Exceltk/Exceltk.csproj`.
+CI: GitHub Actions (`.github/workflows/ci.yml`) builds on .NET 10 and runs `src/test.sh`.
+
## Build on MacOS
```bash
dotnet publish -r osx-x64 src/Exceltk/Exceltk.csproj -c Release
@@ -102,10 +104,10 @@ dotnet publish -r osx-arm64 src/Exceltk/Exceltk.csproj -c Release
```bash
dotnet publish -r win-x86 src/Exceltk/Exceltk.csproj -c Release
```
-You can also open `src/exceltk_vs.sln` in Visual Studio.
+Open `src/exceltk.sln` (SDK-style `Exceltk.csproj`) in Visual Studio / VS Code. The legacy `exceltk_vs.sln` / `Exceltk_vs.csproj` (.NET Framework) is obsolete.
## Build on Linux (example: ubuntu / linux-x64)
-1. Install the [.NET 8 SDK](https://learn.microsoft.com/dotnet/core/install/linux)
+1. Install the [.NET 10 SDK](https://learn.microsoft.com/dotnet/core/install/linux)
2. From the repo root:
```bash
@@ -118,8 +120,8 @@ dotnet run --project src/Exceltk/Exceltk.csproj -c Release -- -t md -xls src/tes
```bash
dotnet publish -r linux-x64 src/Exceltk/Exceltk.csproj -c Release
-# output under: src/bin/net8.0/linux-x64/publish/exceltk
-./src/bin/net8.0/linux-x64/publish/exceltk -t md -xls src/test/test1.xlsx
+# output under: src/bin/net10.0/linux-x64/publish/exceltk
+./src/bin/net10.0/linux-x64/publish/exceltk -t md -xls src/test/test1.xlsx
```
`linux-x64` is the portable RID for Ubuntu and most x64 Linux distros. Other RIDs: https://learn.microsoft.com/dotnet/core/rid-catalog
diff --git a/README.zhcn.txt b/README.zhcn.txt
index 1fdec57..b003cba 100644
--- a/README.zhcn.txt
+++ b/README.zhcn.txt
@@ -85,14 +85,14 @@ exceltk -t md -a r -xls example.xlsx
- 使用 `-sn` 把数字拆分,例如`1234656` 会被拆成`1 2 3 4 5 6`, 如果表太大时有用
# 在 Linux 上构建与使用
-需要安装 [.NET 8 SDK](https://learn.microsoft.com/dotnet/core/install/linux)。
+需要安装 [.NET 10 SDK](https://learn.microsoft.com/dotnet/core/install/linux)(LTS)。仓库根目录 `global.json` 会约束使用 .NET 10 SDK。
```bash
dotnet build src/Exceltk/Exceltk.csproj -c Release
dotnet run --project src/Exceltk/Exceltk.csproj -c Release -- -t md -xls src/test/test1.xlsx
dotnet publish -r linux-x64 src/Exceltk/Exceltk.csproj -c Release
-./src/bin/net8.0/linux-x64/publish/exceltk -t md -xls src/test/test1.xlsx
+./src/bin/net10.0/linux-x64/publish/exceltk -t md -xls src/test/test1.xlsx
```
-说明:`dotnet run` 传参时请在参数前加 `--`,避免 `-t` / `-a` 被 dotnet 自己吃掉。更多平台说明见英文 README 的 How to build。
+说明:`dotnet run` 传参时请在参数前加 `--`,避免 `-t` / `-a` 被 dotnet 自己吃掉。CI 见 `.github/workflows/ci.yml`。更多平台说明见英文 README 的 How to build。
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..4ae80ef
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "10.0.100",
+ "rollForward": "latestMajor"
+ }
+}
diff --git a/src/Exceltk/Exceltk.csproj b/src/Exceltk/Exceltk.csproj
index 3e4930f..31b394e 100644
--- a/src/Exceltk/Exceltk.csproj
+++ b/src/Exceltk/Exceltk.csproj
@@ -3,10 +3,12 @@
Exe
../bin
- net8.0
+ net10.0
Properties
exceltk
exceltk
+ disable
+ disable
@@ -17,19 +19,8 @@
win-x86;osx-x64;osx-arm64;linux-x64
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
diff --git a/src/Exceltk/app.config b/src/Exceltk/app.config
deleted file mode 100644
index 5ae58a9..0000000
--- a/src/Exceltk/app.config
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test.sh b/src/test.sh
index fe53a19..446aed9 100755
--- a/src/test.sh
+++ b/src/test.sh
@@ -1,22 +1,32 @@
#!/bin/bash
-dotnet restore
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test1.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test2.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test3.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test4.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test5.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test6_crossline.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test7_large_tail_empty_columns.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test8.xls
-dotnet run -p Exceltk/Exceltk.csproj -t md -bhead -xls test/test10_bodyhead.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -bhead -xls test/test9_formula.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -t md -bhead -xls test/test11_form.xls
-dotnet run -p Exceltk/Exceltk.csproj -t md -xls test/test13_csv.csv
-dotnet run -p Exceltk/Exceltk.csproj -t md -csv test/test13_csv.csv
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -pretty -xls test/test13_csv.csv
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -pretty -a c -xls test/test13_csv.csv
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -pretty -a r -xls test/test13_csv.csv
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -mmd -xls test/test6_crossline.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -xls test/test14_late_columns.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -xls test/test10_nostyles.xlsx
-dotnet run -p Exceltk/Exceltk.csproj -- -t md -xls test/test8_issue8_hyperlinks.xlsx
+set -euo pipefail
+
+PROJECT=Exceltk/Exceltk.csproj
+
+dotnet restore "$PROJECT"
+
+run() {
+ # App args after -- so dotnet CLI does not consume -t / -a / etc.
+ dotnet run --project "$PROJECT" -- "$@"
+}
+
+run -t md -xls test/test1.xlsx
+run -t md -xls test/test2.xlsx
+run -t md -xls test/test3.xlsx
+run -t md -xls test/test4.xlsx
+run -t md -xls test/test5.xlsx
+run -t md -xls test/test6_crossline.xlsx
+run -t md -xls test/test7_large_tail_empty_columns.xlsx
+run -t md -xls test/test8.xls
+run -t md -bhead -xls test/test10_bodyhead.xlsx
+run -t md -bhead -xls test/test9_formula.xlsx
+run -t md -bhead -xls test/test11_form.xls
+run -t md -xls test/test13_csv.csv
+run -t md -csv test/test13_csv.csv
+run -t md -pretty -xls test/test13_csv.csv
+run -t md -pretty -a c -xls test/test13_csv.csv
+run -t md -pretty -a r -xls test/test13_csv.csv
+run -t md -mmd -xls test/test6_crossline.xlsx
+run -t md -xls test/test14_late_columns.xlsx
+run -t md -xls test/test10_nostyles.xlsx
+run -t md -xls test/test8_issue8_hyperlinks.xlsx