diff --git a/.cargo/config.toml b/.cargo/config.toml index 4311154..915e521 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,3 +2,18 @@ rustdocflags = ["--document-private-items"] # rustflags = "-C target-cpu=native -D warnings" # incremental = true + +[target.armv7-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc" + +[target.armv7-unknown-linux-musleabihf] +linker = "arm-linux-gnueabihf-gcc" + +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" + +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-gnu-gcc" + +[target.i686-unknown-linux-gnu] +linker = "i686-linux-gnu-gcc" diff --git a/.github/workflows/cross-ci.yml b/.github/workflows/cross-ci.yml index 5e16a20..ab3596a 100644 --- a/.github/workflows/cross-ci.yml +++ b/.github/workflows/cross-ci.yml @@ -24,7 +24,7 @@ concurrency: jobs: cross-check: - name: Cross checking ${{ matrix.job.target }} + name: Cross checking ${{ matrix.job.target }} on ${{ matrix.rust }} runs-on: ${{ matrix.job.os }} strategy: fail-fast: false @@ -36,13 +36,11 @@ jobs: target: x86_64-pc-windows-msvc architecture: x86_64 use-cross: false - # FIXME: cross-compilation is not working on windows, due to `sha2` and `aws-ls-sys` dependency - # - os: windows-latest - # os-name: windows - # target: x86_64-pc-windows-gnu - # architecture: x86_64 - # binary-postfix: ".exe" - # use-cross: true + - os: windows-latest + os-name: windows + target: x86_64-pc-windows-gnu + architecture: x86_64 + use-cross: false - os: macos-13 os-name: macos target: x86_64-apple-darwin @@ -52,7 +50,7 @@ jobs: os-name: macos target: aarch64-apple-darwin architecture: arm64 - use-cross: false + use-cross: true - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-gnu @@ -68,23 +66,26 @@ jobs: target: aarch64-unknown-linux-gnu architecture: arm64 use-cross: true + - os: ubuntu-latest + os-name: linux + target: aarch64-unknown-linux-musl + architecture: arm64 + use-cross: true - os: ubuntu-latest os-name: linux target: i686-unknown-linux-gnu architecture: i686 use-cross: true - # FIXME: Doesn't build, due to cannot find -lexecinfo - # - os: ubuntu-latest - # os-name: netbsd - # target: x86_64-unknown-netbsd - # architecture: x86_64 - # use-cross: true - # FIXME: Doesn't cross-compile, due to `aws-ls-sys` dependency - # - os: ubuntu-latest - # os-name: linux - # target: armv7-unknown-linux-gnueabihf - # architecture: armv7 - # use-cross: true + - os: ubuntu-latest + os-name: netbsd + target: x86_64-unknown-netbsd + architecture: x86_64 + use-cross: true + - os: ubuntu-latest + os-name: linux + target: armv7-unknown-linux-gnueabihf + architecture: armv7 + use-cross: true steps: - name: Checkout repository diff --git a/Cargo.toml b/Cargo.toml index f206b02..d3aa9ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -142,6 +142,7 @@ unused_comparisons = "warn" unused_parens = "warn" while_true = "warn" unreachable_pub = "allow" +non_local_definitions = "allow" [workspace.lints.clippy] redundant_pub_crate = "allow" diff --git a/dist-workspace.toml b/dist-workspace.toml index bbada1e..566f00a 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -12,7 +12,7 @@ ci = "github" # The installers to generate for each app installers = ["shell", "powershell", "homebrew", "msi"] # 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", "x86_64-pc-windows-msvc"] +targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc", "i686-unknown-linux-gnu"] # Path that installers should place binaries in install-path = "CARGO_HOME" # Whether to install an updater program @@ -26,8 +26,25 @@ tap = "rustic-rs/homebrew-tap" # Publish jobs to run in CI publish-jobs = ["homebrew"] +[dist.github-custom-runners] +aarch64-apple-darwin = "macos-latest" +aarch64-unknown-linux-gnu = "ubuntu-latest" +aarch64-unknown-linux-musl = "ubuntu-latest" +armv7-unknown-linux-gnueabihf = "ubuntu-latest" +i686-unknown-linux-gnu = "ubuntu-latest" +x86_64-apple-darwin = "macos-13" +x86_64-pc-windows-gnu = "windows-latest" +x86_64-pc-windows-msvc = "windows-latest" +x86_64-unknown-linux-gnu = "ubuntu-latest" +x86_64-unknown-linux-musl = "ubuntu-latest" + [dist.dependencies.chocolatey] nasm = '*' # Required for building `aws-lc-sys` on Windows [dist.dependencies.apt] gcc-aarch64-linux-gnu = { version = '*', targets = ["aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl"] } +gcc-arm-linux-gnueabihf = { version = '*', targets = ["armv7-unknown-linux-gnueabihf"] } +gcc-i686-linux-gnu = { version = '*', targets = ["i686-unknown-linux-gnu"] } +gcc-multilib-i686-linux-gnu = { version = '*', targets = ["i686-unknown-linux-gnu"] } +musl-tools = { version = '*', targets = ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl"] } +musl-dev = { version = '*', targets = ["aarch64-unknown-linux-musl", "x86_64-unknown-linux-musl"] } diff --git a/src/lib.rs b/src/lib.rs index 35d9b55..6feb548 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,8 @@ //! //! [Abscissa]: https://github.com/iqlusioninc/abscissa +#![allow(non_local_definitions)] + pub mod application; pub mod commands; pub mod config;