From 5f38c9c5567013323438625c9a485d9f789f04f2 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Thu, 12 Sep 2024 16:58:43 +0200 Subject: [PATCH 1/8] fix 'latest' llvm CI job: add apt packages and use ubuntu 24.04 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a279ef0f..aaf1be69d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,11 +115,11 @@ jobs: # Release build (latest pre-release of LLVM) - BUILD_TYPE: Release - OS: ubuntu-20.04 + OS: ubuntu-24.04 CC: clang WITH_LLVM: "LATEST" - EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' - EXTRA_APT_PACKAGES: llvm + EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble main' + EXTRA_APT_PACKAGES: llvm clang lldb lld clangd libllvmlibc-20-dev ## In-tree builds (we just check a few configurations to make sure they work): # Debug build From 983a3a63eaa6018e825bc43c4a860f3b910b4836 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Mon, 16 Sep 2024 09:52:12 +0200 Subject: [PATCH 2/8] Add a fixed name for each CI job that doesn't change if the other build parameters are changed for a job --- .github/workflows/ci.yml | 100 ++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaf1be69d..64116ba8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,12 +4,13 @@ on: [push, pull_request] jobs: build: runs-on: ${{ matrix.OS }} - name: "${{ matrix.BUILD_TYPE }}-${{ matrix.OS }}-${{ matrix.CC }} (${{ toJSON(matrix) }})" + name: ${{ matrix.NAME }} strategy: fail-fast: false matrix: include: - - BUILD_TYPE: Debug + - NAME: debug_bfd_mpc + BUILD_TYPE: Debug WITH_BFD: yes WITH_LATEST_GCC: yes WITH_COVERAGE: yes @@ -19,7 +20,8 @@ jobs: CC: gcc EXTRA_APT_PACKAGES: g++-12 gcc-12 - - BUILD_TYPE: Debug + - NAME: debug_bfd_mpc_flint_in_tree + BUILD_TYPE: Debug WITH_BFD: yes WITH_COVERAGE: yes TEST_IN_TREE: yes @@ -29,21 +31,24 @@ jobs: CC: gcc OS: ubuntu-20.04 - # Debug build (with BFD) - - BUILD_TYPE: Debug + # Debug build (with BFD) + - NAME: debug_bfd + BUILD_TYPE: Debug WITH_BFD: yes OS: ubuntu-20.04 CC: gcc # Debug build (with BFD and SYMENGINE_THREAD_SAFE) - - BUILD_TYPE: Debug + - NAME: debug_bfd_thread_safe + BUILD_TYPE: Debug WITH_BFD: yes WITH_SYMENGINE_THREAD_SAFE: yes OS: ubuntu-20.04 CC: gcc # Debug build (with BFD, ECM, PRIMESIEVE and MPC) - - BUILD_TYPE: Debug + - NAME: debug_bfd_ecm_primesieve_mpc + BUILD_TYPE: Debug WITH_BFD: yes WITH_ECM: yes WITH_PRIMESIEVE: yes @@ -52,7 +57,8 @@ jobs: CC: gcc # Debug build (with BFD, Flint and Arb and INTEGER_CLASS from flint) - - BUILD_TYPE: Debug + - NAME: debug_bfd_flint_arb_intflint + BUILD_TYPE: Debug WITH_BFD: yes WITH_ARB: yes INTEGER_CLASS: flint @@ -62,7 +68,8 @@ jobs: CC: gcc # Debug build (with BFD, MPFR and INTEGER_CLASS from gmpxx) - - BUILD_TYPE: Debug + - NAME: debug_bfd_mpfr_intgmpxx + BUILD_TYPE: Debug WITH_SYMENGINE_RCP: yes WITH_MPFR: yes INTEGER_CLASS: gmpxx @@ -70,7 +77,8 @@ jobs: CC: gcc # Debug build (with BFD and INTEGER_CLASS from boostmp) - - BUILD_TYPE: Debug + - NAME: debug_bfd_intboost + BUILD_TYPE: Debug WITH_BFD: yes INTEGER_CLASS: boostmp OS: ubuntu-22.04 @@ -79,25 +87,29 @@ jobs: EXTRA_APT_PACKAGES: g++-12 gcc-12 # Debug build shared lib (with BFD) - - BUILD_TYPE: Debug + - NAME: debug_bfd_shared_libs + BUILD_TYPE: Debug WITH_BFD: yes BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: gcc # Release build (with BFD) - - WITH_BFD: yes + - NAME: release_bfd + WITH_BFD: yes OS: ubuntu-20.04 CC: gcc # Release shared build (with BFD) - - WITH_BFD: yes + - NAME: release_bfd_shared_libs + WITH_BFD: yes BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: gcc # Release build (recent LLVM) - - BUILD_TYPE: Release + - NAME: release_llvm + BUILD_TYPE: Release OS: ubuntu-20.04 CC: clang WITH_LLVM: 13 @@ -105,7 +117,8 @@ jobs: EXTRA_APT_PACKAGES: clang-13 llvm-13 # Release build (recent LLVM + clang) - - BUILD_TYPE: Release + - NAME: release_llvm_clang + BUILD_TYPE: Release OS: ubuntu-20.04 CC: clang-18 CXX: clang++-18 @@ -114,7 +127,8 @@ jobs: EXTRA_APT_PACKAGES: clang-18 llvm-18 # Release build (latest pre-release of LLVM) - - BUILD_TYPE: Release + - NAME: release_llvm_prerelease + BUILD_TYPE: Release OS: ubuntu-24.04 CC: clang WITH_LLVM: "LATEST" @@ -123,76 +137,89 @@ jobs: ## In-tree builds (we just check a few configurations to make sure they work): # Debug build - - BUILD_TYPE: Debug + - NAME: debug_bfd_in_tree + BUILD_TYPE: Debug WITH_BFD: yes TEST_IN_TREE: yes OS: ubuntu-20.04 CC: gcc - - TEST_CLANG_FORMAT: yes + - NAME: clang_format + TEST_CLANG_FORMAT: yes OS: ubuntu-20.04 CC: gcc - - BUILD_TYPE: Debug + - NAME: debug_bfd_piranha_shared_libs + BUILD_TYPE: Debug WITH_BFD: yes WITH_PIRANHA: yes BUILD_SHARED_LIBS: yes CC: gcc OS: ubuntu-22.04 - - BUILD_TYPE: Debug + - NAME: debug_bfd_piranha_intpiranha + BUILD_TYPE: Debug WITH_BFD: yes WITH_PIRANHA: yes INTEGER_CLASS: piranha CC: gcc OS: ubuntu-22.04 - - BUILD_TYPE: Debug + - NAME: debug_bfd_llvm + BUILD_TYPE: Debug WITH_BFD: yes WITH_LLVM: 12 WITH_COVERAGE: yes CC: clang OS: ubuntu-20.04 - - BUILD_TYPE: Release + - NAME: release_llvm_benchmarks + BUILD_TYPE: Release WITH_BENCHMARKS: yes WITH_BENCHMARKS_GOOGLE: yes WITH_LLVM: 14 CC: clang OS: ubuntu-22.04 - - BUILD_TYPE: Debug + - NAME: debug_llvm_macos + BUILD_TYPE: Debug WITH_LLVM: 5.0 OS: macos-13 CC: clang - - BUILD_TYPE: Release + - NAME: release_llvm_macos + BUILD_TYPE: Release WITH_LLVM: 5.0 OS: macos-13 CC: clang - - BUILD_TYPE: Debug + - NAME: debug_gcc_macos + BUILD_TYPE: Debug OS: macos-13 CC: gcc - - BUILD_TYPE: Release + - NAME: release_gcc_macos + BUILD_TYPE: Release OS: macos-13 CC: gcc - - BUILD_TYPE: Debug + - NAME: debug_llvm_asan + BUILD_TYPE: Debug WITH_SANITIZE: address WITH_LLVM: 12 WITH_COTIRE: no CC: clang OS: ubuntu-20.04 - - BUILD_TYPE: Debug + - NAME: debug_llvm_ubsan + BUILD_TYPE: Debug WITH_SANITIZE: undefined WITH_LLVM: 12 CC: clang OS: ubuntu-20.04 - - BUILD_TYPE: Debug + - NAME: debug_rcp_msan + BUILD_TYPE: Debug WITH_SANITIZE: memory WITH_SYMENGINE_RCP: yes WITH_BFD: no @@ -203,27 +230,32 @@ jobs: CC: clang OS: ubuntu-22.04 - - CONDA_ENV_FILE: symengine/utilities/matchpycpp/environment.yml + - NAME: matchpycpp + CONDA_ENV_FILE: symengine/utilities/matchpycpp/environment.yml CC: gcc OS: ubuntu-20.04 - - MSYSTEM: MINGW64 + - NAME: release_mingw64 + MSYSTEM: MINGW64 ARCH: x86_64 OS: windows-2019 BUILD_TYPE: Release - - MSYSTEM: MINGW64 + - NAME: debug_mingw64 + MSYSTEM: MINGW64 ARCH: x86_64 OS: windows-2019 BUILD_TYPE: Debug - - MSYSTEM: MINGW32 + - NAME: release_mpfr_mingw32 + MSYSTEM: MINGW32 ARCH: i686 OS: windows-2019 BUILD_TYPE: Release WITH_MPFR: yes - - MSYSTEM: MINGW32 + - NAME: debug_mpfr_mpc_mingw32 + MSYSTEM: MINGW32 ARCH: i686 OS: windows-2019 BUILD_TYPE: Debug From c7f3f1339a38f374cda8e4bc0e8c4b4491550d0a Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Mon, 16 Sep 2024 09:54:59 +0200 Subject: [PATCH 3/8] reduce CI duplication, only run CI on pull requests or pushes to master branch --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64116ba8c..ec3ecbeee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,11 @@ name: Build and test symengine -on: [push, pull_request] - +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: build: runs-on: ${{ matrix.OS }} From 20a0aa688a7e2365bfe2c8f03b3cc343e654f638 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Wed, 18 Sep 2024 09:24:43 +0200 Subject: [PATCH 4/8] Try re-actors/alls-green action to have a single job that can be marked required --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec3ecbeee..719fd5318 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -336,3 +336,13 @@ jobs: if: matrix.MSYSTEM == '' run: | source bin/test_symengine_unix.sh + + check: + if: always() + needs: build + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} \ No newline at end of file From 522a060630c39b3ad61d1722b2ddbaebf80d203c Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Wed, 18 Sep 2024 09:28:31 +0200 Subject: [PATCH 5/8] break a job to see if new check action also fails --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 719fd5318..062f11f9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,7 @@ jobs: CC: clang WITH_LLVM: "LATEST" EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble main' - EXTRA_APT_PACKAGES: llvm clang lldb lld clangd libllvmlibc-20-dev + EXTRA_APT_PACKAGES: llvm clang ## In-tree builds (we just check a few configurations to make sure they work): # Debug build From 22f57edd8ef796d5cb24b9f9293537509feb6a24 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Wed, 18 Sep 2024 10:48:04 +0200 Subject: [PATCH 6/8] revert to 20.04 to break job as llvm install issue apparently fixed on 24.04 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 062f11f9f..a66809be1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,10 +134,10 @@ jobs: # Release build (latest pre-release of LLVM) - NAME: release_llvm_prerelease BUILD_TYPE: Release - OS: ubuntu-24.04 + OS: ubuntu-20.04 CC: clang WITH_LLVM: "LATEST" - EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble main' + EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' EXTRA_APT_PACKAGES: llvm clang ## In-tree builds (we just check a few configurations to make sure they work): From 820b51480d79a1984b5283eb2d78754b509bc1f3 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Wed, 18 Sep 2024 11:32:27 +0200 Subject: [PATCH 7/8] Revert "Add a fixed name for each CI job that doesn't change if the other build parameters are changed for a job" This reverts commit 983a3a63eaa6018e825bc43c4a860f3b910b4836. --- .github/workflows/ci.yml | 102 ++++++++++++++------------------------- 1 file changed, 35 insertions(+), 67 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a66809be1..b46f4642b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,13 +9,12 @@ on: jobs: build: runs-on: ${{ matrix.OS }} - name: ${{ matrix.NAME }} + name: "${{ matrix.BUILD_TYPE }}-${{ matrix.OS }}-${{ matrix.CC }} (${{ toJSON(matrix) }})" strategy: fail-fast: false matrix: include: - - NAME: debug_bfd_mpc - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_LATEST_GCC: yes WITH_COVERAGE: yes @@ -25,8 +24,7 @@ jobs: CC: gcc EXTRA_APT_PACKAGES: g++-12 gcc-12 - - NAME: debug_bfd_mpc_flint_in_tree - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_COVERAGE: yes TEST_IN_TREE: yes @@ -36,24 +34,21 @@ jobs: CC: gcc OS: ubuntu-20.04 - # Debug build (with BFD) - - NAME: debug_bfd - BUILD_TYPE: Debug + # Debug build (with BFD) + - BUILD_TYPE: Debug WITH_BFD: yes OS: ubuntu-20.04 CC: gcc # Debug build (with BFD and SYMENGINE_THREAD_SAFE) - - NAME: debug_bfd_thread_safe - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_SYMENGINE_THREAD_SAFE: yes OS: ubuntu-20.04 CC: gcc # Debug build (with BFD, ECM, PRIMESIEVE and MPC) - - NAME: debug_bfd_ecm_primesieve_mpc - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_ECM: yes WITH_PRIMESIEVE: yes @@ -62,8 +57,7 @@ jobs: CC: gcc # Debug build (with BFD, Flint and Arb and INTEGER_CLASS from flint) - - NAME: debug_bfd_flint_arb_intflint - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_ARB: yes INTEGER_CLASS: flint @@ -73,8 +67,7 @@ jobs: CC: gcc # Debug build (with BFD, MPFR and INTEGER_CLASS from gmpxx) - - NAME: debug_bfd_mpfr_intgmpxx - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_SYMENGINE_RCP: yes WITH_MPFR: yes INTEGER_CLASS: gmpxx @@ -82,8 +75,7 @@ jobs: CC: gcc # Debug build (with BFD and INTEGER_CLASS from boostmp) - - NAME: debug_bfd_intboost - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes INTEGER_CLASS: boostmp OS: ubuntu-22.04 @@ -92,29 +84,25 @@ jobs: EXTRA_APT_PACKAGES: g++-12 gcc-12 # Debug build shared lib (with BFD) - - NAME: debug_bfd_shared_libs - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: gcc # Release build (with BFD) - - NAME: release_bfd - WITH_BFD: yes + - WITH_BFD: yes OS: ubuntu-20.04 CC: gcc # Release shared build (with BFD) - - NAME: release_bfd_shared_libs - WITH_BFD: yes + - WITH_BFD: yes BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: gcc # Release build (recent LLVM) - - NAME: release_llvm - BUILD_TYPE: Release + - BUILD_TYPE: Release OS: ubuntu-20.04 CC: clang WITH_LLVM: 13 @@ -122,8 +110,7 @@ jobs: EXTRA_APT_PACKAGES: clang-13 llvm-13 # Release build (recent LLVM + clang) - - NAME: release_llvm_clang - BUILD_TYPE: Release + - BUILD_TYPE: Release OS: ubuntu-20.04 CC: clang-18 CXX: clang++-18 @@ -132,9 +119,8 @@ jobs: EXTRA_APT_PACKAGES: clang-18 llvm-18 # Release build (latest pre-release of LLVM) - - NAME: release_llvm_prerelease - BUILD_TYPE: Release - OS: ubuntu-20.04 + - BUILD_TYPE: Release + OS: ubuntu-24.04 CC: clang WITH_LLVM: "LATEST" EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' @@ -142,89 +128,76 @@ jobs: ## In-tree builds (we just check a few configurations to make sure they work): # Debug build - - NAME: debug_bfd_in_tree - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes TEST_IN_TREE: yes OS: ubuntu-20.04 CC: gcc - - NAME: clang_format - TEST_CLANG_FORMAT: yes + - TEST_CLANG_FORMAT: yes OS: ubuntu-20.04 CC: gcc - - NAME: debug_bfd_piranha_shared_libs - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_PIRANHA: yes BUILD_SHARED_LIBS: yes CC: gcc OS: ubuntu-22.04 - - NAME: debug_bfd_piranha_intpiranha - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_PIRANHA: yes INTEGER_CLASS: piranha CC: gcc OS: ubuntu-22.04 - - NAME: debug_bfd_llvm - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_BFD: yes WITH_LLVM: 12 WITH_COVERAGE: yes CC: clang OS: ubuntu-20.04 - - NAME: release_llvm_benchmarks - BUILD_TYPE: Release + - BUILD_TYPE: Release WITH_BENCHMARKS: yes WITH_BENCHMARKS_GOOGLE: yes WITH_LLVM: 14 CC: clang OS: ubuntu-22.04 - - NAME: debug_llvm_macos - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_LLVM: 5.0 OS: macos-13 CC: clang - - NAME: release_llvm_macos - BUILD_TYPE: Release + - BUILD_TYPE: Release WITH_LLVM: 5.0 OS: macos-13 CC: clang - - NAME: debug_gcc_macos - BUILD_TYPE: Debug + - BUILD_TYPE: Debug OS: macos-13 CC: gcc - - NAME: release_gcc_macos - BUILD_TYPE: Release + - BUILD_TYPE: Release OS: macos-13 CC: gcc - - NAME: debug_llvm_asan - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_SANITIZE: address WITH_LLVM: 12 WITH_COTIRE: no CC: clang OS: ubuntu-20.04 - - NAME: debug_llvm_ubsan - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_SANITIZE: undefined WITH_LLVM: 12 CC: clang OS: ubuntu-20.04 - - NAME: debug_rcp_msan - BUILD_TYPE: Debug + - BUILD_TYPE: Debug WITH_SANITIZE: memory WITH_SYMENGINE_RCP: yes WITH_BFD: no @@ -235,32 +208,27 @@ jobs: CC: clang OS: ubuntu-22.04 - - NAME: matchpycpp - CONDA_ENV_FILE: symengine/utilities/matchpycpp/environment.yml + - CONDA_ENV_FILE: symengine/utilities/matchpycpp/environment.yml CC: gcc OS: ubuntu-20.04 - - NAME: release_mingw64 - MSYSTEM: MINGW64 + - MSYSTEM: MINGW64 ARCH: x86_64 OS: windows-2019 BUILD_TYPE: Release - - NAME: debug_mingw64 - MSYSTEM: MINGW64 + - MSYSTEM: MINGW64 ARCH: x86_64 OS: windows-2019 BUILD_TYPE: Debug - - NAME: release_mpfr_mingw32 - MSYSTEM: MINGW32 + - MSYSTEM: MINGW32 ARCH: i686 OS: windows-2019 BUILD_TYPE: Release WITH_MPFR: yes - - NAME: debug_mpfr_mpc_mingw32 - MSYSTEM: MINGW32 + - MSYSTEM: MINGW32 ARCH: i686 OS: windows-2019 BUILD_TYPE: Debug From 8f8fcdd4ec98b12aed7ff05a9b507dd17360c034 Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Wed, 18 Sep 2024 11:35:21 +0200 Subject: [PATCH 8/8] remove clang --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b46f4642b..7b87fa8e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: CC: clang WITH_LLVM: "LATEST" EXTRA_APT_REPOSITORY: 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' - EXTRA_APT_PACKAGES: llvm clang + EXTRA_APT_PACKAGES: llvm ## In-tree builds (we just check a few configurations to make sure they work): # Debug build