From 759d180f4fea5ce0d6c40006728d3c6eec87c783 Mon Sep 17 00:00:00 2001 From: Onur Date: Fri, 24 Mar 2023 21:17:24 +0300 Subject: [PATCH] fix: build linux x86-64 with reasonable glibc (#1733) * use `ubuntu-18.04` for dev and release builds Signed-off-by: ozkanonur * always cancel previous `in-progress` pipelines when new commit pushed Signed-off-by: ozkanonur * switch from `ubuntu-latest` to `ubuntu-18.04` for all builds Signed-off-by: ozkanonur * turn off share generics nightly feature Signed-off-by: ozkanonur * set JEMALLOC environments in CI Signed-off-by: ozkanonur * rollback jemalloc entry from changelog Signed-off-by: ozkanonur --------- Signed-off-by: ozkanonur Reviewed-by: shamardy --- .cargo/config | 2 +- .github/workflows/dev-build.yml | 15 ++++++++++----- .github/workflows/fmt-and-lint.yml | 4 ++++ .github/workflows/release-build.yml | 13 +++++++++---- .github/workflows/test.yml | 4 ++++ .github/workflows/virustotal_scan.yml | 4 ++++ CHANGELOG.md | 1 - 7 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.cargo/config b/.cargo/config index 564b1fb152..c81c668c82 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,5 +1,5 @@ [env] -JEMALLOC_SYS_WITH_MALLOC_CONF = "percpu_arena:percpu,oversize_threshold:0,background_thread:true,metadata_thp:auto,dirty_decay_ms:5000,muzzy_decay_ms:5000" +JEMALLOC_SYS_WITH_MALLOC_CONF = "background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,metadata_thp:auto" [target.'cfg(all())'] rustflags = [ "-Zshare-generics=y" ] diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 7bbb5f5f92..900048e6ae 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -7,14 +7,19 @@ on: branches: - dev +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} MANUAL_MM_VERSION: true + JEMALLOC_SYS_WITH_MALLOC_CONF: 'background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,metadata_thp:auto' jobs: linux-x86-64: timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -193,7 +198,7 @@ jobs: wasm: timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -281,7 +286,7 @@ jobs: android-aarch64: timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -329,7 +334,7 @@ jobs: android-armv7: timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -380,7 +385,7 @@ jobs: if: github.event_name != 'pull_request' needs: linux-x86-64 timeout-minutes: 15 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/fmt-and-lint.yml b/.github/workflows/fmt-and-lint.yml index 6ee8a2c1a2..b9c5c92701 100644 --- a/.github/workflows/fmt-and-lint.yml +++ b/.github/workflows/fmt-and-lint.yml @@ -9,6 +9,10 @@ on: - main - dev +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: fmt-and-lint: timeout-minutes: 45 diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 21820340a1..9cf009f810 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -4,14 +4,19 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} MANUAL_MM_VERSION: true + JEMALLOC_SYS_WITH_MALLOC_CONF: 'background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,metadata_thp:auto' jobs: linux-x86-64: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -188,7 +193,7 @@ jobs: wasm: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -276,7 +281,7 @@ jobs: android-aarch64: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -324,7 +329,7 @@ jobs: android-armv7: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 - name: Install toolchain diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae9b84fe07..5cd82b5311 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,10 @@ on: - main - dev +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: FROM_SHARED_RUNNER: true diff --git a/.github/workflows/virustotal_scan.yml b/.github/workflows/virustotal_scan.yml index 551990ddc0..b292e47050 100644 --- a/.github/workflows/virustotal_scan.yml +++ b/.github/workflows/virustotal_scan.yml @@ -4,6 +4,10 @@ on: release: types: [created, edited, released, published] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: virustotal: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 20713685a6..0ae1785eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,6 @@ - CI/CD migrated from Azure to Github runners [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699) - CI tests are much stabilized [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699) - Integration and unit tests are seperated on CI stack [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699) -- Jemalloc configuration updated for optimization purposes [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699) - Codebase is updated in linting rules at wasm and test stack [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699) - `crossbeam` bumped to `0.8` from `0.7` [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699) - Un-used/Unstable parts of mm2 excluded from build outputs which avoids mm2 runtime from potential UB [#1699](https://github.com/KomodoPlatform/atomicDEX-API/pull/1699)