From 942fe52df44a358ecaf60106f280ceb33fa39c5c Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 12 Nov 2025 01:25:18 +0100 Subject: [PATCH 01/16] add ci action --- .github/workflows/ci.yml | 31 +++++++++++++++++ .github/workflows/release.yml | 64 +++++------------------------------ 2 files changed, 40 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b31b4ad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + pull_request: + +jobs: + test: + name: Build and test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, Windows] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + if: matrix.os == 'ubuntu-latest' + + - name: Cache cargo registry and git index + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build and test + run: cargo test --workspace --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c477e3..593674a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,16 @@ -name: Release crate +name: CI on: - release: - types: [published] + push: + pull_request: jobs: - release: - name: Publish to crates.io and create GitHub Release - runs-on: ubuntu-latest + test: + name: Build and test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, Windows] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -25,52 +28,3 @@ jobs: - name: Build and test run: cargo test --workspace --verbose - - - name: Install cargo-edit and set crate version - id: set_version - run: | - cargo install cargo-edit --locked --force - TAG="${{ github.event.release.tag_name }}" - VERSION="${TAG#v}" - cargo set-version "$VERSION" --workspace - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Configure Cargo registries (crates.io default + add Gitea) - shell: bash - env: - TOKEN: ${{ secrets.CARGO_GITEA_TOKEN }} - GITEA_BASE_URL: https://git.heiserer.de - REGISTRY_OWNER: ${{ github.repository_owner }} - run: | - mkdir -p ~/.cargo - # crates.io stays default - cat > ~/.cargo/config.toml <<'EOF' - [registry] - default = "crates-io" - EOF - - # Add Gitea as extra registry (sparse index recommended) - { - echo "[registries.gitea]" - echo "index = \"sparse+${GITEA_BASE_URL}/api/packages/${REGISTRY_OWNER}/cargo/\"" - } >> ~/.cargo/config.toml - - # Auth for Gitea registry - umask 077 - cat > ~/.cargo/credentials.toml < Date: Tue, 18 Nov 2025 23:20:13 +0100 Subject: [PATCH 02/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b31b4ad..d5c2a4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, Windows] + os: [ubuntu-latest, windows-latest] steps: - name: Checkout repository uses: actions/checkout@v4 -- 2.49.1 From dcd4131c0f6202cb5e8e4839ff13a99ea81da182 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:27:18 +0100 Subject: [PATCH 03/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5c2a4e..4ffd1be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,14 @@ jobs: uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-toolchain@stable if: matrix.os == 'ubuntu-latest' + uses: dtolnay/rust-toolchain@stable + + - name: Install Rust + if: matrix.os == 'windows-latest' + run: | + choco install rust-ms + - name: Cache cargo registry and git index uses: actions/cache@v4 -- 2.49.1 From 187ab2e38736decf587230f1645f3e7b7f8b5392 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:28:36 +0100 Subject: [PATCH 04/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ffd1be..f8428be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install rust-ms + choco install rust-ms -y - name: Cache cargo registry and git index -- 2.49.1 From e14bacb5f35efa79166656e9c5439991606e9a40 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:36:09 +0100 Subject: [PATCH 05/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8428be..0736a71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,9 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | + choco install visualstudio2022-workload-vctools -y choco install rust-ms -y + - name: Cache cargo registry and git index -- 2.49.1 From ecb6f4dfea021d468e24c021d8f44089c217f427 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:39:26 +0100 Subject: [PATCH 06/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0736a71..a35c8e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install visualstudio2022-workload-vctools -y + choco install visualstudio2019-workload-vctools -y choco install rust-ms -y -- 2.49.1 From 7c3d5c54f1d62ee56a32ac6fa4857025487c0b10 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:43:04 +0100 Subject: [PATCH 07/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a35c8e0..45ac7d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,8 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install visualstudio2019-workload-vctools -y - choco install rust-ms -y + choco install visualstudio2019-workload-vctools -y --force + choco install rust-ms -y --force -- 2.49.1 From f993b0a3255ce0504d053ee735d952135e874a9c Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:51:40 +0100 Subject: [PATCH 08/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45ac7d5..2bb1412 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,6 @@ jobs: choco install visualstudio2019-workload-vctools -y --force choco install rust-ms -y --force - - - name: Cache cargo registry and git index uses: actions/cache@v4 with: -- 2.49.1 From 1c997baabb70b33825a39d0fbb228ced75469fb2 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 18 Nov 2025 23:58:14 +0100 Subject: [PATCH 09/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bb1412..742b896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,8 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install visualstudio2019-workload-vctools -y --force - choco install rust-ms -y --force + choco install visualstudio2019-workload-vctools -y + choco install rust-ms -y - name: Cache cargo registry and git index uses: actions/cache@v4 -- 2.49.1 From eca94e03d8c2224769d092a98387997ffe540738 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 19 Nov 2025 00:02:54 +0100 Subject: [PATCH 10/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 742b896..e185c32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: CI on: - push: pull_request: jobs: -- 2.49.1 From a99e600c47885122685c819d2c34df716a11ae3f Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 19 Nov 2025 00:20:29 +0100 Subject: [PATCH 11/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e185c32..fdb860b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,6 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install visualstudio2019-workload-vctools -y choco install rust-ms -y - name: Cache cargo registry and git index -- 2.49.1 From ced958b6280e1a29bc6ef4984c36e7908b5d5be3 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 19 Nov 2025 00:21:49 +0100 Subject: [PATCH 12/16] .github/workflows/release.yml aktualisiert --- .github/workflows/release.yml | 64 ++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 593674a..8316bd8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,13 @@ -name: CI +name: Release crate on: - push: - pull_request: + release: + types: [published] jobs: - test: - name: Build and test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, Windows] + release: + name: Publish to crates.io and create GitHub Release + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -28,3 +25,52 @@ jobs: - name: Build and test run: cargo test --workspace --verbose + + - name: Install cargo-edit and set crate version + id: set_version + run: | + cargo install cargo-edit --locked --force + TAG="${{ github.event.release.tag_name }}" + VERSION="${TAG#v}" + cargo set-version "$VERSION" --workspace + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Configure Cargo registries (crates.io default + add Gitea) + shell: bash + env: + TOKEN: ${{ secrets.CARGO_GITEA_TOKEN }} + GITEA_BASE_URL: https://git.heiserer.de + REGISTRY_OWNER: ${{ github.repository_owner }} + run: | + mkdir -p ~/.cargo + # crates.io stays default + cat > ~/.cargo/config.toml <<'EOF' + [registry] + default = "crates-io" + EOF + + # Add Gitea as extra registry (sparse index recommended) + { + echo "[registries.gitea]" + echo "index = \"sparse+${GITEA_BASE_URL}/api/packages/${REGISTRY_OWNER}/cargo/\"" + } >> ~/.cargo/config.toml + + # Auth for Gitea registry + umask 077 + cat > ~/.cargo/credentials.toml < Date: Wed, 19 Nov 2025 00:23:06 +0100 Subject: [PATCH 13/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdb860b..76ce010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: run: | choco install rust-ms -y + - name: Cache cargo registry and git index uses: actions/cache@v4 with: -- 2.49.1 From 12e7f67ffe826fe8c88aea06d12726796f2713d3 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 19 Nov 2025 00:27:59 +0100 Subject: [PATCH 14/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ce010..a1aba02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | + choco install visualstudio2022-workload-vctools choco install rust-ms -y -- 2.49.1 From 5bf7f3c88578a592ab81c13d64baba0ad33d8b2c Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 19 Nov 2025 00:30:52 +0100 Subject: [PATCH 15/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1aba02..2cc802d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install visualstudio2022-workload-vctools + choco install visualstudio2022-workload-vctools -y choco install rust-ms -y -- 2.49.1 From e7df5b7b077f271df12d9aa9d9e9aef84b68a014 Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Wed, 19 Nov 2025 00:40:01 +0100 Subject: [PATCH 16/16] .github/workflows/ci.yml aktualisiert --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cc802d..76ce010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,6 @@ jobs: - name: Install Rust if: matrix.os == 'windows-latest' run: | - choco install visualstudio2022-workload-vctools -y choco install rust-ms -y -- 2.49.1