diff --git a/.github/workflows/create-source-binary-x64.yml b/.github/workflows/create-source-binary-x64.yml deleted file mode 100644 index a1b435aa5..000000000 --- a/.github/workflows/create-source-binary-x64.yml +++ /dev/null @@ -1,78 +0,0 @@ -## Github workflow to create multiarch binaries from source - -name: Create Binaries for x86_64 - -on: - workflow_call: - inputs: - tag: - description: "Tag name of this release (x.y.z)" - required: true - type: string - arch: - description: "Stringified JSON object listing of platform matrix" - required: false - type: string - default: >- - ["linux-glibc-x64", "linux-musl-x64", "macos-x64", "windows-x64"] - cpu: - description: "Stringified JSON object listing of target CPU matrix" - required: false - type: string - default: >- - ["x86-64", "x86-64-v3"] - -## change the display name to the tag being built -run-name: ${{ inputs.tag }} - -concurrency: - group: create-binary-${{ github.head_ref || github.ref || github.run_id}} - ## Only cancel in progress if this is for a PR - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - -jobs: - ## Runs when the following is true: - ## - tag is provided - ## - workflow is building default branch (master) - artifact: - if: | - inputs.tag != '' && - github.ref == format('refs/heads/{0}', github.event.repository.default_branch) - name: Build Binaries - runs-on: ubuntu-latest - strategy: - ## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch - max-parallel: 10 - matrix: - platform: ${{ fromJson(inputs.arch) }} - cpu: ${{ fromJson(inputs.cpu) }} - steps: - ## Setup Docker for the builds - - name: Docker setup - uses: stacks-network/actions/docker@main - - ## Build the binaries using defined dockerfiles - - name: Build Binary (${{ matrix.platform }}_${{ matrix.cpu }}) - id: build_binaries - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # 5.0.0 - with: - file: build-scripts/Dockerfile.${{ matrix.platform }} - outputs: type=local,dest=./release/${{ matrix.platform }} - build-args: | - STACKS_NODE_VERSION=${{ inputs.tag || env.GITHUB_SHA_SHORT }} - OS_ARCH=${{ matrix.platform }} - TARGET_CPU=${{ matrix.cpu }} - GIT_BRANCH=${{ env.GITHUB_REF_SHORT }} - GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }} - - ## Compress the binary artifact - - name: Compress artifact - id: compress_artifact - run: zip --junk-paths ${{ matrix.platform }}_${{ matrix.cpu }} ./release/${{ matrix.platform }}/* - - ## Upload the binary artifact to the github action (used in `github-release.yml` to create a release) - - name: Upload artifact - id: upload_artifact - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - path: ${{ matrix.platform }}_${{ matrix.cpu }}.zip diff --git a/clarity/Cargo.toml b/clarity/Cargo.toml index c0b82a7fd..f6a5c70cb 100644 --- a/clarity/Cargo.toml +++ b/clarity/Cargo.toml @@ -56,6 +56,6 @@ developer-mode = [] slog_json = ["stacks_common/slog_json"] testing = [] -[target.'cfg(all(target_arch = "x86_64", not(target_env = "msvc")))'.dependencies] +[target.'cfg(all(target_arch = "x86_64", not(any(target_os="windows"))))'.dependencies] sha2-asm = "0.5.3" diff --git a/libsigner/Cargo.toml b/libsigner/Cargo.toml index 4b1f21eef..e04dcbbdc 100644 --- a/libsigner/Cargo.toml +++ b/libsigner/Cargo.toml @@ -44,8 +44,8 @@ features = ["arbitrary_precision", "unbounded_depth"] version = "0.24.3" features = ["serde", "recovery"] -[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies] +[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] sha2 = { version = "0.10", features = ["asm"] } -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), target_env = "msvc"))'.dependencies] +[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os = "windows")))'.dependencies] sha2 = { version = "0.10" } diff --git a/libstackerdb/Cargo.toml b/libstackerdb/Cargo.toml index 53cf128ed..0d54de542 100644 --- a/libstackerdb/Cargo.toml +++ b/libstackerdb/Cargo.toml @@ -26,8 +26,8 @@ clarity = { path = "../clarity" } version = "0.24.3" features = ["serde", "recovery"] -[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies] +[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] sha2 = { version = "0.10", features = ["asm"] } -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), target_env = "msvc"))'.dependencies] +[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os = "windows")))'.dependencies] sha2 = { version = "0.10" } diff --git a/stacks-common/Cargo.toml b/stacks-common/Cargo.toml index 50eadfb85..d9f987f57 100644 --- a/stacks-common/Cargo.toml +++ b/stacks-common/Cargo.toml @@ -78,8 +78,8 @@ developer-mode = [] slog_json = ["slog-json"] testing = [] -[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies] +[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] sha2 = { version = "0.10", features = ["asm"] } -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), target_env = "msvc"))'.dependencies] +[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] sha2 = { version = "0.10" } diff --git a/stackslib/Cargo.toml b/stackslib/Cargo.toml index 8e2c48301..be7533711 100644 --- a/stackslib/Cargo.toml +++ b/stackslib/Cargo.toml @@ -59,7 +59,7 @@ siphasher = "0.3.7" wsts = { workspace = true } hashbrown = { workspace = true } -[target.'cfg(not(target_env = "msvc"))'.dependencies] +[target.'cfg(not(any(target_os = "macos",target_os="windows", target_arch = "arm" )))'.dependencies] tikv-jemallocator = {workspace = true} [target.'cfg(unix)'.dependencies] @@ -114,8 +114,8 @@ monitoring_prom = ["prometheus"] slog_json = ["slog-json", "stacks-common/slog_json", "clarity/slog_json", "pox-locking/slog_json"] testing = [] -[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies] +[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies] sha2 = { version = "0.10", features = ["asm"] } -[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), target_env = "msvc"))'.dependencies] +[target.'cfg(any(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")), any(target_os="windows")))'.dependencies] sha2 = { version = "0.10" } diff --git a/stackslib/src/main.rs b/stackslib/src/main.rs index 652d9bf2d..0e0f242b0 100644 --- a/stackslib/src/main.rs +++ b/stackslib/src/main.rs @@ -26,10 +26,10 @@ extern crate stacks_common; #[macro_use(o, slog_log, slog_trace, slog_debug, slog_info, slog_warn, slog_error)] extern crate slog; -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_os = "macos", target_os = "windows", target_arch = "arm")))] use tikv_jemallocator::Jemalloc; -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_os = "macos", target_os = "windows", target_arch = "arm")))] #[global_allocator] static GLOBAL: Jemalloc = Jemalloc; diff --git a/testnet/stacks-node/Cargo.toml b/testnet/stacks-node/Cargo.toml index 71f8808a1..72cc8d249 100644 --- a/testnet/stacks-node/Cargo.toml +++ b/testnet/stacks-node/Cargo.toml @@ -32,7 +32,7 @@ rand = { workspace = true } rand_core = { workspace = true } hashbrown = { workspace = true } -[target.'cfg(not(target_env = "msvc"))'.dependencies] +[target.'cfg(not(any(target_os = "macos", target_os="windows", target_arch = "arm")))'.dependencies] tikv-jemallocator = {workspace = true} [dev-dependencies] diff --git a/testnet/stacks-node/src/main.rs b/testnet/stacks-node/src/main.rs index 29d1fde36..c63653535 100644 --- a/testnet/stacks-node/src/main.rs +++ b/testnet/stacks-node/src/main.rs @@ -43,7 +43,7 @@ use stacks::chainstate::coordinator::{get_next_recipients, OnChainRewardSetProvi use stacks::chainstate::stacks::address::PoxAddress; use stacks::chainstate::stacks::db::blocks::DummyEventDispatcher; use stacks::chainstate::stacks::db::StacksChainState; -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_os = "macos", target_os = "windows", target_arch = "arm")))] use tikv_jemallocator::Jemalloc; pub use self::burnchains::{ @@ -60,7 +60,7 @@ use crate::mockamoto::MockamotoNode; use crate::neon_node::{BlockMinerThread, TipCandidate}; use crate::run_loop::boot_nakamoto; -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_os = "macos", target_os = "windows", target_arch = "arm")))] #[global_allocator] static GLOBAL: Jemalloc = Jemalloc;