From 887f0e91ca2c502a653f66a21d16379fcbd50dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 13:42:10 +0200 Subject: [PATCH 01/15] move to astral's fork of dist --- .github/workflows/release.yml | 18 ++++++++++++------ dist-workspace.toml | 4 +++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d17ef807..9455a258 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ -# This file was autogenerated by dist: https://opensource.axo.dev/cargo-dist/ +# This file was autogenerated by dist: https://github.com/astral-sh/cargo-dist # # Copyright 2022-2024, axodotdev +# Copyright 2025 Astral Software Inc. # SPDX-License-Identifier: MIT or Apache-2.0 # # CI that: @@ -47,7 +48,7 @@ on: jobs: # Run 'dist plan' (or host) to determine what tasks we need to do plan: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" outputs: val: ${{ steps.plan.outputs.manifest }} tag: ${{ !github.event.pull_request && github.ref_name || '' }} @@ -58,12 +59,13 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install dist # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.28.0/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5/cargo-dist-installer.sh | sh" - name: Cache dist uses: actions/upload-artifact@v4 with: @@ -117,6 +119,7 @@ jobs: git config --global core.longpaths true - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install Rust non-interactively if not already installed if: ${{ matrix.container }} @@ -172,13 +175,14 @@ jobs: needs: - plan - build-local-artifacts - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install cached dist uses: actions/download-artifact@v4 @@ -222,12 +226,13 @@ jobs: if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" outputs: val: ${{ steps.host.outputs.manifest }} steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install cached dist uses: actions/download-artifact@v4 @@ -286,10 +291,11 @@ jobs: # still allowing individual publish jobs to skip themselves (for prereleases). # "host" however must run to completion, no skipping allowed! if: ${{ always() && needs.host.result == 'success' }} - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive diff --git a/dist-workspace.toml b/dist-workspace.toml index 5e546cfb..44c52272 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -3,8 +3,10 @@ members = ["cargo:."] # Config for 'dist' [dist] +# Whether +crt-static should be used on msvc +msvc-crt-static = false # The preferred dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.28.0" +cargo-dist-version = "0.28.5" # CI backends to support ci = "github" # The installers to generate for each app From 1cf03cc8c82b73a4d501acbf1e14d6f771da652a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 13:52:40 +0200 Subject: [PATCH 02/15] overwrite cargo-dist to get patch --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9455a258..ed9519a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,12 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5/cargo-dist-installer.sh | sh" + # Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 + run: cargo install cargo-dist \ + --git https://github.com/CramBL/cargo-dist \ + --branch fix-ignored-msvc-crt-static-flag \ + --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 + #run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5/cargo-dist-installer.sh | sh" - name: Cache dist uses: actions/upload-artifact@v4 with: From 9819dd2e9e478155fecaefd383ba2ce075a20ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 13:59:09 +0200 Subject: [PATCH 03/15] set just env vars --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f6cda4bd..2ae5763f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,6 +17,8 @@ env: RUSTDOCFLAGS: -D warnings RUST_BACKTRACE: 1 RUST_LOG: debug + JUST_VERBOSE: 1 + JUST_COLOR: always jobs: check: From 4145873e500642969ea046e885346e0eba442880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:00:46 +0200 Subject: [PATCH 04/15] use custom build setup --- .github/workflows/build-setup.yml | 20 ++++++++++++++++++++ .github/workflows/release.yml | 21 +++++++++++++++------ dist-workspace.toml | 3 +++ 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build-setup.yml diff --git a/.github/workflows/build-setup.yml b/.github/workflows/build-setup.yml new file mode 100644 index 00000000..a07f5b42 --- /dev/null +++ b/.github/workflows/build-setup.yml @@ -0,0 +1,20 @@ +- name: Install Just + uses: extractions/setup-just@v3 +- name: Install HDF5 + shell: bash + run: just init::install-hdf5-headers + +- name: Run MSI installer (windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + cd just\hdf + msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart + +# Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 +- name: Use patched cargo-dist version (windows) + if: runner.os == 'Windows' + run: cargo install cargo-dist \ + --git https://github.com/CramBL/cargo-dist \ + --branch fix-ignored-msvc-crt-static-flag \ + --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed9519a4..bbd6957b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,12 +65,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - # Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 - run: cargo install cargo-dist \ - --git https://github.com/CramBL/cargo-dist \ - --branch fix-ignored-msvc-crt-static-flag \ - --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 - #run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.5/cargo-dist-installer.sh | sh" - name: Cache dist uses: actions/upload-artifact@v4 with: @@ -133,6 +128,20 @@ jobs: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y echo "$HOME/.cargo/bin" >> $GITHUB_PATH fi + - name: "Install Just" + uses: "extractions/setup-just@v3" + - name: "Install HDF5" + run: "just init::install-hdf5-headers" + shell: "bash" + - name: "Run MSI installer (windows)" + if: "runner.os == 'Windows'" + run: | + cd just\hdf + msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart + shell: "pwsh" + - name: "Use patched cargo-dist version (windows)" + if: "runner.os == 'Windows'" + run: "cargo install cargo-dist \\ --git https://github.com/CramBL/cargo-dist \\ --branch fix-ignored-msvc-crt-static-flag \\ --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6" - uses: swatinem/rust-cache@v2 with: key: ${{ join(matrix.targets, '-') }} diff --git a/dist-workspace.toml b/dist-workspace.toml index 44c52272..c4ed4555 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -1,6 +1,8 @@ [workspace] members = ["cargo:."] +allow-dirty = true + # Config for 'dist' [dist] # Whether +crt-static should be used on msvc @@ -19,3 +21,4 @@ install-path = "CARGO_HOME" install-updater = false # Which actions to run on pull requests pr-run-mode = "upload" +github-build-setup = "build-setup.yml" From ccde44f58deccbdd65ecef481dd266d7ee730614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:06:15 +0200 Subject: [PATCH 05/15] fix --- Justfile | 8 ++------ just/init.just | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/Justfile b/Justfile index 613560d2..d2ee0588 100644 --- a/Justfile +++ b/Justfile @@ -1,6 +1,7 @@ import 'just/mod.just' # CI only recipes, `just -l ci` to list them mod ci 'just/ci.just' +mod init 'just/init.just' set windows-shell := ["powershell.exe", "-c"] @@ -24,12 +25,7 @@ export RUST_LOG := env_var_or_default("RUST_LOG", "info") export PLOTINATOR_BYPASS_UPDATES := env_var_or_default("PLOTINATOR_BYPASS_UPDATES", "true") @_default: - just --list --no-aliases - -[group("Init")] -init: install-devtools - @echo "Run {{BOLD + YELLOW}}install-extra-devtools{{NORMAL}} for some adittional productivity tools that fit into the existent workflow" - @echo "Run {{BOLD + YELLOW}}apt-install-hdf5-header{{NORMAL}} to get HDF5 headers for developing HDF5 features on linux" + just --list [doc("Checks both native and wasm"), group("Check"), no-exit-message] check-all: check check-wasm diff --git a/just/init.just b/just/init.just index 47c3f6e4..36adf9a1 100644 --- a/just/init.just +++ b/just/init.just @@ -1,3 +1,9 @@ +[group("Init")] +init: install-devtools + @echo "Run {{BOLD + YELLOW}}install-extra-devtools{{NORMAL}} for some adittional productivity tools that fit into the existent workflow" + @echo "Run {{BOLD + YELLOW}}apt-install-hdf5-header{{NORMAL}} to get HDF5 headers for developing HDF5 features on linux" + + # Trunk is used to serve the app with a webserver, cargo-dist is used to generate and update workflows for distributing installers for various platforms [group("Init"), doc("Install the required tools for performing all dev tasks for the project")] install-devtools: @@ -15,4 +21,36 @@ install-extra-devtools: [group("Init")] apt-install-hdf5-header: - sudo apt install libhdf5-dev \ No newline at end of file + sudo apt install libhdf5-dev + +[windows] +msi-install-hdf5-headers: + #!/usr/bin/env bash + set -eo pipefail + VERSION="1.14.0" + DL_URL="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-${VERSION}/bin/windows/hdf5-${VERSION}-Std-win10_64-vs16.zip" + # Download and extract HDF5 + curl -L -o hdf5.zip "${DL_URL}" + unzip hdf5.zip + if [[ "${GITHUB_ACTIONS}" == "true" ]]; then + just init::set-github-hdf5-env-vars "${VERSION}" + fi + + +[windows] +set-github-hdf5-env-vars VERSION: + echo "HDF5_DIR=C:\\Program Files\\HDF_Group\\HDF5\\{{VERSION}}" >> $GITHUB_ENV + echo "C:\\Program Files\\HDF_Group\\HDF5\\{{VERSION}}\\bin" >> $GITHUB_PATH + +[macos] +brew-install-hdf5-headers: + brew install hdf5 + +[linux] +install-hdf5-headers: apt-install-hdf5-headers + +[macos] +install-hdf5-headers: brew-install-hdf5-headers + +[windows] +install-hdf5-headers: msi-install-hdf5-headers \ No newline at end of file From fc5f08a6d875ac6b569b17e40e3e7204b8cddee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:10:04 +0200 Subject: [PATCH 06/15] tweak --- Justfile | 1 - just/init.just | 2 ++ just/mod.just | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index d2ee0588..4f09452e 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,6 @@ set windows-shell := ["powershell.exe", "-c"] PROJECT_NAME := "plotinator3000" -alias i := init alias t := test alias l := lint alias fmt := format diff --git a/just/init.just b/just/init.just index 36adf9a1..08fded33 100644 --- a/just/init.just +++ b/just/init.just @@ -1,3 +1,5 @@ +set windows-shell := ["powershell.exe", "-c"] + [group("Init")] init: install-devtools @echo "Run {{BOLD + YELLOW}}install-extra-devtools{{NORMAL}} for some adittional productivity tools that fit into the existent workflow" diff --git a/just/mod.just b/just/mod.just index 73e6941e..af88a6ee 100644 --- a/just/mod.just +++ b/just/mod.just @@ -1,3 +1,2 @@ import 'default_cmd.just' -import 'init.just' import 'mqtt.just' From aa002759c873fe12f0cc7a68a69910c8dd3bc572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:14:24 +0200 Subject: [PATCH 07/15] fix typo --- Justfile | 1 + just/init.just | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index 4f09452e..c402d066 100644 --- a/Justfile +++ b/Justfile @@ -1,6 +1,7 @@ import 'just/mod.just' # CI only recipes, `just -l ci` to list them mod ci 'just/ci.just' +# init only recipes, `just -l init` to list them mod init 'just/init.just' set windows-shell := ["powershell.exe", "-c"] diff --git a/just/init.just b/just/init.just index 08fded33..c93d6872 100644 --- a/just/init.just +++ b/just/init.just @@ -3,7 +3,7 @@ set windows-shell := ["powershell.exe", "-c"] [group("Init")] init: install-devtools @echo "Run {{BOLD + YELLOW}}install-extra-devtools{{NORMAL}} for some adittional productivity tools that fit into the existent workflow" - @echo "Run {{BOLD + YELLOW}}apt-install-hdf5-header{{NORMAL}} to get HDF5 headers for developing HDF5 features on linux" + @echo "Run {{BOLD + YELLOW}}apt-install-hdf5-headers{{NORMAL}} to get HDF5 headers for developing HDF5 features on linux" # Trunk is used to serve the app with a webserver, cargo-dist is used to generate and update workflows for distributing installers for various platforms @@ -22,7 +22,7 @@ install-extra-devtools: cargo install bacon --locked [group("Init")] -apt-install-hdf5-header: +apt-install-hdf5-headers: sudo apt install libhdf5-dev [windows] From cd48d222d7df9475aef20f19920b2ed7171aecd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:25:27 +0200 Subject: [PATCH 08/15] ensure update functionality is not bypassed in CI --- .cargo/config.toml | 4 ++++ src/updater.rs | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index ac2b23f8..25d69f04 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,6 @@ [target.x86_64-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static"] + +[env] +# We generally want to bypass updates in the build, they should only really be run in CI as they touch many parts of the host +PLOTINATOR_BYPASS_UPDATES = "true" diff --git a/src/updater.rs b/src/updater.rs index 9c45e520..68d30251 100644 --- a/src/updater.rs +++ b/src/updater.rs @@ -209,7 +209,15 @@ pub fn update_if_applicable() -> axoupdater::AxoupdateResult { /// Check for the environment variable to bypass updates fn bypass_updates() -> bool { + // This is generally set in the build environment (see config.toml) if let Ok(value) = env::var(BYPASS_UPDATES_ENV_VAR) { + // If we're in the build environment and we detect CI, we don't allow bypassing updates + if let Ok(value) = env::var("GITHUB_ACTIONS") { + if value == "true" { + log::info!("GitHub actions detected, disabling bypass updates"); + return false; + } + } if value == "1" || value.eq_ignore_ascii_case("true") { log::info!("Update bypassed due to environment variable."); return true; From 8a4321ea5af317a5a3df9d4f1a793771a9302a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:26:55 +0200 Subject: [PATCH 09/15] dont escape newline, breaks cause they are double escaped by dist --- .github/workflows/build-setup.yml | 5 +---- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-setup.yml b/.github/workflows/build-setup.yml index a07f5b42..4dd5b5e8 100644 --- a/.github/workflows/build-setup.yml +++ b/.github/workflows/build-setup.yml @@ -14,7 +14,4 @@ # Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 - name: Use patched cargo-dist version (windows) if: runner.os == 'Windows' - run: cargo install cargo-dist \ - --git https://github.com/CramBL/cargo-dist \ - --branch fix-ignored-msvc-crt-static-flag \ - --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 \ No newline at end of file + run: cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bbd6957b..06e89597 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,7 +141,7 @@ jobs: shell: "pwsh" - name: "Use patched cargo-dist version (windows)" if: "runner.os == 'Windows'" - run: "cargo install cargo-dist \\ --git https://github.com/CramBL/cargo-dist \\ --branch fix-ignored-msvc-crt-static-flag \\ --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6" + run: "cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6" - uses: swatinem/rust-cache@v2 with: key: ${{ join(matrix.targets, '-') }} From 8c9bdb4f52f837801868c927abc47206eed6c82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:33:35 +0200 Subject: [PATCH 10/15] change location of build-setup.yml --- .github/{workflows => custom_build_setup}/build-setup.yml | 0 dist-workspace.toml | 8 +++----- 2 files changed, 3 insertions(+), 5 deletions(-) rename .github/{workflows => custom_build_setup}/build-setup.yml (100%) diff --git a/.github/workflows/build-setup.yml b/.github/custom_build_setup/build-setup.yml similarity index 100% rename from .github/workflows/build-setup.yml rename to .github/custom_build_setup/build-setup.yml diff --git a/dist-workspace.toml b/dist-workspace.toml index c4ed4555..b443989b 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -1,12 +1,8 @@ [workspace] members = ["cargo:."] -allow-dirty = true - # Config for 'dist' [dist] -# Whether +crt-static should be used on msvc -msvc-crt-static = false # The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.28.5" # CI backends to support @@ -21,4 +17,6 @@ install-path = "CARGO_HOME" install-updater = false # Which actions to run on pull requests pr-run-mode = "upload" -github-build-setup = "build-setup.yml" +# Whether +crt-static should be used on msvc +msvc-crt-static = false +github-build-setup = "../custom_build_setup/build-setup.yml" From c879fdc15b05c3a13640a20258aa155f7d7e8bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:45:48 +0200 Subject: [PATCH 11/15] dont set crt static in config.toml --- .cargo/config.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 25d69f04..be89a788 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,3 @@ -[target.x86_64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] - [env] # We generally want to bypass updates in the build, they should only really be run in CI as they touch many parts of the host PLOTINATOR_BYPASS_UPDATES = "true" From ff4381180d0812c6841449d9ea5bb052e45aac32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:53:30 +0200 Subject: [PATCH 12/15] use dirty release.yml --- .github/custom_build_setup/build-setup.yml | 5 ----- .github/workflows/release.yml | 8 +++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/custom_build_setup/build-setup.yml b/.github/custom_build_setup/build-setup.yml index 4dd5b5e8..4d78bf0a 100644 --- a/.github/custom_build_setup/build-setup.yml +++ b/.github/custom_build_setup/build-setup.yml @@ -10,8 +10,3 @@ run: | cd just\hdf msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart - -# Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 -- name: Use patched cargo-dist version (windows) - if: runner.os == 'Windows' - run: cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06e89597..13b80405 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,15 +139,17 @@ jobs: cd just\hdf msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart shell: "pwsh" - - name: "Use patched cargo-dist version (windows)" - if: "runner.os == 'Windows'" - run: "cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6" - uses: swatinem/rust-cache@v2 with: key: ${{ join(matrix.targets, '-') }} cache-provider: ${{ matrix.cache_provider }} - name: Install dist run: ${{ matrix.install_dist.run }} + + # Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 + - name: Use patched cargo-dist version (windows) + if: runner.os == 'Windows' + run: cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 # Get the dist-manifest - name: Fetch local artifacts uses: actions/download-artifact@v4 From 89cbf7fb9f7736456cebbdf16032f771c6bdbb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 14:55:29 +0200 Subject: [PATCH 13/15] set allow dirty --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13b80405..969a7d76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,7 +78,7 @@ jobs: # but also really annoying to build CI around when it needs secrets to work right.) - id: plan run: | - dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json + dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json --allow-dirty > plan-dist-manifest.json echo "dist ran successfully" cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" @@ -163,7 +163,7 @@ jobs: - name: Build artifacts run: | # Actually do builds and make zips and whatnot - dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json + dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --allow-dirty --output-format=json ${{ matrix.dist_args }} > dist-manifest.json echo "dist ran successfully" - id: cargo-dist name: Post-build @@ -216,7 +216,7 @@ jobs: - id: cargo-dist shell: bash run: | - dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json + dist build ${{ needs.plan.outputs.tag-flag }} --allow-dirty --output-format=json "--artifacts=global" > dist-manifest.json echo "dist ran successfully" # Parse out what we just built and upload it to scratch storage @@ -266,7 +266,7 @@ jobs: - id: host shell: bash run: | - dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json + dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --allow-dirty --output-format=json > dist-manifest.json echo "artifacts uploaded and released successfully" cat dist-manifest.json echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT" From 4c981e6ffa539472347810eac9c8d5199c585225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Sat, 10 May 2025 15:06:54 +0200 Subject: [PATCH 14/15] force install --- .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 969a7d76..ff526c8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,7 +149,7 @@ jobs: # Need to overwrite it to fix: https://github.com/astral-sh/cargo-dist/pull/36 - name: Use patched cargo-dist version (windows) if: runner.os == 'Windows' - run: cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 + run: cargo install cargo-dist --git https://github.com/CramBL/cargo-dist --branch fix-ignored-msvc-crt-static-flag --rev a4cabb10395c7b275ea40d1636cd2d0e58be8af6 --force # Get the dist-manifest - name: Fetch local artifacts uses: actions/download-artifact@v4 From 9bd0abaaba486166420f5b0b2f4ebe1c710ef30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Beck=20K=C3=B6nig?= Date: Mon, 12 May 2025 14:06:34 +0200 Subject: [PATCH 15/15] bump --- CHANGELOG.md | 9 +++++++++ Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ae13054..86e6a0d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [1.12.0] + +### Changed + +- Move from the discontinued original `cargo-dist` to the [fork maintained by astral](https://github.com/astral-sh/cargo-dist) +- Use the forked `cargo-dist` with the MSVC CRT linker configuration fix in the release workflow (astral [PR here](https://github.com/astral-sh/cargo-dist/pull/36)) +- Avoid statically linking MSVC CRT to allow statically linking HDF5 on windows. +- Disallow bypassing updates in CI, to force tests to run update scenarios + ### Dependencies - `anyhow`: 1.0.97 → 1.0.98 ([#228](https://github.com/luftkode/plotinator3000/pull/228)) diff --git a/Cargo.lock b/Cargo.lock index 1d9257bf..4e2eb4ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2455,7 +2455,7 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "log_if" -version = "1.11.1" +version = "1.12.0" dependencies = [ "chrono", "log", @@ -3215,7 +3215,7 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plot_util" -version = "1.11.1" +version = "1.12.0" dependencies = [ "chrono", "egui", @@ -3232,7 +3232,7 @@ dependencies = [ [[package]] name = "plotinator3000" -version = "1.11.1" +version = "1.12.0" dependencies = [ "axoupdater", "chrono", @@ -3271,11 +3271,11 @@ dependencies = [ [[package]] name = "plotinator_macros" -version = "1.11.1" +version = "1.12.0" [[package]] name = "plotinator_mqtt" -version = "1.11.1" +version = "1.12.0" dependencies = [ "anyhow", "egui_plot", @@ -4124,7 +4124,7 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "skytem_hdf" -version = "1.11.1" +version = "1.12.0" dependencies = [ "byteorder", "chrono", @@ -4147,7 +4147,7 @@ dependencies = [ [[package]] name = "skytem_logs" -version = "1.11.1" +version = "1.12.0" dependencies = [ "byteorder", "chrono", @@ -4397,7 +4397,7 @@ dependencies = [ [[package]] name = "test_util" -version = "1.11.1" +version = "1.12.0" dependencies = [ "paste", "testresult", diff --git a/Cargo.toml b/Cargo.toml index aa70d004..bc6465fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ members = ["crates/*"] [workspace.package] authors = ["SkyTEM Surveys", "Marc Beck König"] -version = "1.11.1" +version = "1.12.0" edition = "2024" rust-version = "1.85.0" license = "MIT OR Apache-2.0"