From 593a16b58a1eeb6af8473694b95a3b7146c24876 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 23 May 2025 18:39:59 +0300 Subject: [PATCH 1/4] Experiment with profiles --- Cargo.toml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b9484c0..8de9c7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,10 +21,18 @@ panic = "unwind" opt-level = 0 [profile.release] +codegen-units = 1 overflow-checks = true -lto = "thin" +debug = "full" +lto = true panic = "abort" -opt-level = "z" +opt-level = "s" +split-debuginfo = "packed" +strip = "symbols" +incremental = true + +[profile.bench] +lto = "thin" [lints.rust] unsafe_code = "allow" From e002e84be0def844b018b76f97e50ee4bbe073db Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 23 May 2025 18:58:06 +0300 Subject: [PATCH 2/4] Add release workflow --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f038e32 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version: + description: 'New version (e.g. 0.4.0)' + required: true + type: string + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: master + + - name: Set version + id: set_version + run: | + echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV + + - name: Update version in Cargo.toml + run: | + sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml + + - name: Commit and tag version bump + run: | + git config user.name "Andrei Avram" + git config user.email "6795248+andreiavrammsd@users.noreply.github.com" + git commit -am "Release v${VERSION}" + git tag "v${VERSION}" + + - name: Push changes + run: | + git push origin master + git push origin "v${VERSION}" + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ env.VERSION }} + name: v${{ env.VERSION }} + generate_release_notes: false From 53ef5cf32d8dca73c0ace11717848ed5b31d94cd Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 23 May 2025 19:01:27 +0300 Subject: [PATCH 3/4] Master --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f038e32..caeb144 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: required: true type: string branches: - - main + - master jobs: release: From d8e8dd544b0069b40fefec5d6e1af2a8cfeb7678 Mon Sep 17 00:00:00 2001 From: Andrei Avram <6795248+andreiavrammsd@users.noreply.github.com> Date: Fri, 23 May 2025 19:01:56 +0300 Subject: [PATCH 4/4] Move incremental to dev --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8de9c7a..39b6c5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ overflow-checks = true lto = false panic = "unwind" opt-level = 0 +incremental = true [profile.release] codegen-units = 1 @@ -29,7 +30,6 @@ panic = "abort" opt-level = "s" split-debuginfo = "packed" strip = "symbols" -incremental = true [profile.bench] lto = "thin"