From 65b8f68dd81cf9ea171e2fda0a6db7a71f884511 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Sun, 10 Nov 2024 23:09:24 +0100 Subject: [PATCH] ci(build): add platform-dependent settings and remove ci flag for extra features Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- .github/workflows/cross-ci.yml | 10 ---------- .github/workflows/nightly.yml | 15 --------------- .github/workflows/release-cd.yml | 12 ------------ Cargo.toml | 1 + platform-settings.toml | 10 ++++++++++ 5 files changed, 11 insertions(+), 37 deletions(-) create mode 100644 platform-settings.toml diff --git a/.github/workflows/cross-ci.yml b/.github/workflows/cross-ci.yml index cfeef22..8b0f13e 100644 --- a/.github/workflows/cross-ci.yml +++ b/.github/workflows/cross-ci.yml @@ -35,61 +35,51 @@ jobs: target: x86_64-pc-windows-msvc architecture: x86_64 use-cross: false - extra-features: false - os: windows-latest os-name: windows target: x86_64-pc-windows-gnu architecture: x86_64 use-cross: false - extra-features: false - os: macos-13 os-name: macos target: x86_64-apple-darwin architecture: x86_64 use-cross: false - extra-features: false - os: macos-latest os-name: macos target: aarch64-apple-darwin architecture: arm64 use-cross: true - extra-features: false - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-gnu architecture: x86_64 use-cross: false - extra-features: mount - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-musl architecture: x86_64 use-cross: false - extra-features: mount - os: ubuntu-latest os-name: linux target: aarch64-unknown-linux-gnu architecture: arm64 use-cross: true - extra-features: mount - os: ubuntu-latest os-name: linux target: i686-unknown-linux-gnu architecture: i686 use-cross: true - extra-features: mount - os: ubuntu-latest os-name: netbsd target: x86_64-unknown-netbsd architecture: x86_64 use-cross: true - extra-features: false - os: ubuntu-latest os-name: linux target: armv7-unknown-linux-gnueabihf architecture: armv7 use-cross: true - extra-features: false steps: - name: Checkout repository diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 14fdb11..e32f8d4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -31,59 +31,48 @@ jobs: architecture: x86_64 binary-postfix: ".exe" use-cross: false - extra-features: false - os: windows-latest os-name: windows target: x86_64-pc-windows-gnu architecture: x86_64 binary-postfix: ".exe" use-cross: false - extra-features: false - os: macos-13 os-name: macos target: x86_64-apple-darwin architecture: x86_64 binary-postfix: "" use-cross: false - extra-features: false - os: macos-latest os-name: macos target: aarch64-apple-darwin architecture: arm64 binary-postfix: "" use-cross: true - extra-features: false - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-gnu architecture: x86_64 binary-postfix: "" use-cross: false - extra-features: mount - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-musl architecture: x86_64 binary-postfix: "" use-cross: false - # FIXME: `mount` pobably doesn't work with musl - extra-features: false - os: ubuntu-latest os-name: linux target: aarch64-unknown-linux-gnu architecture: arm64 binary-postfix: "" use-cross: true - # FIXME: We need to install the dependencies in Cross.toml - extra-features: false - os: ubuntu-latest os-name: linux target: i686-unknown-linux-gnu architecture: i686 binary-postfix: "" use-cross: true - # FIXME: We need to install the dependencies in Cross.toml - extra-features: false # TODO!: This needs a fix, linking `execinfo` fails # - os: ubuntu-latest # os-name: netbsd @@ -91,14 +80,12 @@ jobs: # architecture: x86_64 # binary-postfix: "" # use-cross: true - # extra-features: false - os: ubuntu-latest os-name: linux target: armv7-unknown-linux-gnueabihf architecture: armv7 binary-postfix: "" use-cross: true - extra-features: false steps: - name: Checkout repository @@ -125,8 +112,6 @@ jobs: sign-release: true hash-release: true use-project-version: true - extra-cargo-build-args: --features release - extra-features: ${{ matrix.job.extra-features }} publish-nightly: if: ${{ github.repository_owner == 'rustic-rs' && github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/release-cd.yml b/.github/workflows/release-cd.yml index 722fefa..34c07c8 100644 --- a/.github/workflows/release-cd.yml +++ b/.github/workflows/release-cd.yml @@ -36,56 +36,48 @@ jobs: architecture: x86_64 binary-postfix: ".exe" use-cross: false - extra-features: false - os: windows-latest os-name: windows target: x86_64-pc-windows-gnu architecture: x86_64 binary-postfix: ".exe" use-cross: false - extra-features: false - os: macos-13 os-name: macos target: x86_64-apple-darwin architecture: x86_64 binary-postfix: "" use-cross: false - extra-features: false - os: macos-latest os-name: macos target: aarch64-apple-darwin architecture: arm64 binary-postfix: "" use-cross: true - extra-features: false - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-gnu architecture: x86_64 binary-postfix: "" use-cross: false - extra-features: mount - os: ubuntu-latest os-name: linux target: x86_64-unknown-linux-musl architecture: x86_64 binary-postfix: "" use-cross: false - extra-features: mount - os: ubuntu-latest os-name: linux target: aarch64-unknown-linux-gnu architecture: arm64 binary-postfix: "" use-cross: true - extra-features: mount - os: ubuntu-latest os-name: linux target: i686-unknown-linux-gnu architecture: i686 binary-postfix: "" use-cross: true - extra-features: mount # TODO!: This needs a fix, linking `execinfo` fails # - os: ubuntu-latest # os-name: netbsd @@ -93,14 +85,12 @@ jobs: # architecture: x86_64 # binary-postfix: "" # use-cross: true - # extra-features: false - os: ubuntu-latest os-name: linux target: armv7-unknown-linux-gnueabihf architecture: armv7 binary-postfix: "" use-cross: true - extra-features: false steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -126,8 +116,6 @@ jobs: hash-release: true use-project-version: true use-tag-version: true # IMPORTANT: this is being used to make sure the tag that is built is in the archive filename, so automation can download the correct version - extra-cargo-build-args: --features release - extra-features: ${{ matrix.job.extra-features }} create-release: name: Creating release with artifacts diff --git a/Cargo.toml b/Cargo.toml index cea4f13..c25a138 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -125,6 +125,7 @@ toml = "0.8" [target.'cfg(not(windows))'.dependencies] libc = "0.2.159" + # cargo-binstall support # https://github.com/cargo-bins/cargo-binstall/blob/HEAD/SUPPORT.md [package.metadata.binstall] diff --git a/platform-settings.toml b/platform-settings.toml new file mode 100644 index 0000000..84d9984 --- /dev/null +++ b/platform-settings.toml @@ -0,0 +1,10 @@ +[platforms.defaults] +release-features = [ + "release", +] + +# Check if 'build-dependencies.just' needs to be updated +[platforms.x86_64-unknown-linux-gnu] +additional-features = [ + "mount", +]