Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.26.1 #1636

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Nothing Yet!

# Version 0.26.1 (2024-12-12)

This is a bugfix release which fixes an issue where aarch64 Windows cross-compilation wouldn't work out of the box. We've updated the default configuration to ensure that this target just works without additional configuration.

- impl @mistydemeo [fix: always cross-compile to windows via xwin](https://github.com/axodotdev/cargo-dist/pull/1635)

# Version 0.26.0 (2024-12-12)

It's been slightly longer than usual since our last release, and now we're back with a slightly larger than usual release! This version brings several major new features and improvements, including the long-requested Rust cross-compilation feature and support for a few different Rust dependency version tracking formats.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/axodotdev/cargo-dist"
homepage = "https://opensource.axo.dev/cargo-dist/"
version = "0.26.0"
version = "0.26.1"
rust-version = "1.74"

[workspace.dependencies]
# intra-workspace deps (you need to bump these versions when you cut releases too!
cargo-dist-schema = { version = "=0.26.0", path = "cargo-dist-schema" }
axoproject = { version = "=0.26.0", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }
cargo-dist-schema = { version = "=0.26.1", path = "cargo-dist-schema" }
axoproject = { version = "=0.26.1", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }

# first-party deps
axocli = { version = "0.2.0" }
Expand Down
31 changes: 25 additions & 6 deletions cargo-dist/src/backend/ci/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use axoasset::{LocalAsset, SourceFile};
use axoprocess::Cmd;
use camino::{Utf8Path, Utf8PathBuf};
use cargo_dist_schema::{
target_lexicon::{self, OperatingSystem, Triple},
AptPackageName, ChocolateyPackageName, GhaRunStep, GithubGlobalJobConfig, GithubLocalJobConfig,
GithubMatrix, GithubRunnerConfig, GithubRunnerRef, GithubRunners, HomebrewPackageName,
PackageInstallScript, PackageVersion, PipPackageName, TripleNameRef,
target_lexicon::{self, Architecture, OperatingSystem, Triple},
AptPackageName, ChocolateyPackageName, ContainerImageRef, GhaRunStep, GithubGlobalJobConfig,
GithubLocalJobConfig, GithubMatrix, GithubRunnerConfig, GithubRunnerRef, GithubRunners,
HomebrewPackageName, PackageInstallScript, PackageVersion, PipPackageName, TripleNameRef,
};
use itertools::Itertools;
use serde::{Deserialize, Serialize};
Expand All @@ -26,7 +26,7 @@ use crate::{
JinjaGithubRepoPair, JobStyle, ProductionMode, PublishStyle, SystemDependencies,
},
errors::DistResult,
platform::github_runners::target_for_github_runner_or_default,
platform::{github_runners::target_for_github_runner_or_default, targets},
CargoBuildWrapper, DistError, DistGraph, SortedMap, SortedSet,
};

Expand Down Expand Up @@ -661,13 +661,32 @@ fn github_runner_for_target(
let result = Some(match target_triple.operating_system {
OperatingSystem::Linux => runner_to_config(GithubRunnerRef::from_str("ubuntu-20.04")),
OperatingSystem::Darwin => runner_to_config(GithubRunnerRef::from_str("macos-13")),
OperatingSystem::Windows => runner_to_config(GithubRunnerRef::from_str("windows-2019")),
OperatingSystem::Windows => {
// Default to cargo-xwin for Windows cross-compiles
if target_triple.architecture != Architecture::X86_64 {
cargo_xwin()
} else {
runner_to_config(GithubRunnerRef::from_str("windows-2019"))
}
}
_ => return Ok(None),
});

Ok(result)
}

fn cargo_xwin() -> GithubRunnerConfig {
GithubRunnerConfig {
runner: GithubRunnerRef::from_str("ubuntu-20.04").to_owned(),
host: targets::TARGET_X64_LINUX_GNU.to_owned(),
container: Some(cargo_dist_schema::ContainerConfig {
image: ContainerImageRef::from_str("messense/cargo-xwin").to_owned(),
host: targets::TARGET_X64_LINUX_MUSL.to_owned(),
package_manager: None,
}),
}
}

fn brewfile_from<'a>(packages: impl Iterator<Item = &'a HomebrewPackageName>) -> String {
packages
.map(|p| {
Expand Down
6 changes: 1 addition & 5 deletions cargo-dist/src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,6 @@ pub fn build_wrapper_for_cross(
},
// compiling for Windows (making PE binaries, .dll files, etc.)
OperatingSystem::Windows => match host.operating_system {
OperatingSystem::Windows => {
// this is just cross-arch, hopefully no wrappers are needed?
Ok(Some(CargoBuildWrapper::ZigBuild))
}
OperatingSystem::Linux | OperatingSystem::Darwin => {
// cargo-xwin is made for that
Ok(Some(CargoBuildWrapper::Xwin))
Expand All @@ -498,7 +494,7 @@ pub fn build_wrapper_for_cross(
Err(DistError::UnsupportedCrossCompile {
host: host.clone(),
target: target.clone(),
details: format!("no idea how to cross-compile from {host} to windows"),
details: format!("no idea how to cross-compile from {host} to windows with architecture {}", target.architecture),
})
}
},
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist/tests/integration-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,7 @@ fn axolotlsay_cross2() -> Result<(), miette::Report> {
[workspace.metadata.dist]
cargo-dist-version = "{dist_version}"
installers = ["shell", "powershell"]
targets = ["aarch64-unknown-linux-gnu"]
targets = ["aarch64-unknown-linux-gnu", "aarch64-pc-windows-msvc"]
ci = ["github"]
unix-archive = ".tar.gz"
windows-archive = ".tar.gz"
Expand Down
Loading
Loading