From d3bcf9aba578c08a619e5788b40077521f9bde5c Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Fri, 31 Oct 2025 19:36:06 +0100 Subject: [PATCH] ci: add Windows builds, second try (#2966) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi @ellie, I don't want to be a burden, but I'd like to ask if you could please reconsider adding Windows builds now that PowerShell support is merged (#2543). 😇 Most people use PowerShell on Windows, so they'd need an artifact in the future releases in order to use it. Otherwise, they'd have to install Rust and compile it themselves, which is not user-friendly. I'd like to point out that I didn't have issues with building Atuin on Windows when I was rebasing the PowerShell PR (except some initial stuff like `#[cfg]` or a few warnings which were fixed in #2856), so I don't expect this to introduce many problems. This is essentially an updated version of #2714. ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing --- .github/workflows/release.yml | 8 +++++++- .github/workflows/rust.yml | 6 +++--- dist-workspace.toml | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca92fbd3..ce68d19e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,6 @@ # 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 # @@ -60,12 +61,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/astral-sh/cargo-dist/releases/download/v0.28.3/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.7/cargo-dist-installer.sh | sh" - name: Cache dist uses: actions/upload-artifact@v4 with: @@ -119,6 +121,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 }} @@ -181,6 +184,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install cached dist uses: actions/download-artifact@v4 @@ -230,6 +234,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install cached dist uses: actions/download-artifact@v4 @@ -294,4 +299,5 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b65f9a81..5498ed7e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,7 +17,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, macos-14, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -88,7 +88,7 @@ jobs: unit-test: strategy: matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, macos-14, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -118,7 +118,7 @@ jobs: check: strategy: matrix: - os: [ubuntu-latest, macos-14] + os: [ubuntu-latest, macos-14, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/dist-workspace.toml b/dist-workspace.toml index 619b325e..92e28a93 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -6,13 +6,13 @@ members = ["cargo:."] # Path that installers should place binaries in install-path = "~/.atuin/bin" # The preferred dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.28.3" +cargo-dist-version = "0.28.7" # CI backends to support ci = "github" # The installers to generate for each app -installers = ["shell"] +installers = ["shell", "powershell"] # Target platforms to build apps for (Rust target-triple syntax) -targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl"] +targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"] # Which actions to run on pull requests pr-run-mode = "plan" # Whether to install an updater program