From 0e88b4b01fca5d6079fbe07e4854d7acfecb9524 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 12:20:51 +0100 Subject: [PATCH 01/10] Playing around with GitHub actions. --- .../workflows/install-dependencies-ubuntu.yml | 19 +++++++++++++++++++ .github/workflows/native-build.yml | 7 +------ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/install-dependencies-ubuntu.yml diff --git a/.github/workflows/install-dependencies-ubuntu.yml b/.github/workflows/install-dependencies-ubuntu.yml new file mode 100644 index 0000000000..7bda7fc2fd --- /dev/null +++ b/.github/workflows/install-dependencies-ubuntu.yml @@ -0,0 +1,19 @@ +name: Install dependencies ubuntu +on: + workflow_call: + +jobs: + install_dependencies: + runs-on: ubuntu-22.04 + - + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Install dependencies + run: | + sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US + sudo apt-get update + sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev + - name: Install boost Ubuntu 22.04 + run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 316f92793f..88194a319e 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -62,12 +62,7 @@ jobs: submodules: 'recursive' - name: Install dependencies - run: | - sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev - - name: Install boost Ubuntu 22.04 - run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev + uses: ./.github/workflows/install-dependencies-ubuntu.yml - name: Install gcc 11 run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 if : matrix.compiler == 'gcc' && matrix.compiler-version == 11 From a5302c5e1d89bf0bb6d1dba83749e08113a46980 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 12:29:57 +0100 Subject: [PATCH 02/10] Another try. --- .github/workflows/native-build.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 88194a319e..51f097e840 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -12,6 +12,13 @@ concurrency: cancel-in-progress: true jobs: + checkout: + uses: actions/checkout@v3 + with: + submodules: 'recursive' + install-dependencies: + uses: ./.github/workflows/install-dependencies-ubuntu.yml + build: # The CMake configure and build commands are platform-agnostic and should work equally # well on Windows or Mac. You can convert this to a matrix build if you need @@ -57,12 +64,6 @@ jobs: steps: - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - - name: Install dependencies - uses: ./.github/workflows/install-dependencies-ubuntu.yml - name: Install gcc 11 run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 if : matrix.compiler == 'gcc' && matrix.compiler-version == 11 From 29189354d1584e7e54d013dbb014a67cb5bbdaf8 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 12:44:35 +0100 Subject: [PATCH 03/10] Anothernother try --- .github/workflows/install-dependencies-ubuntu.yml | 4 +--- .../install-dependencies-ubuntu/action.yml | 14 ++++++++++++++ .github/workflows/native-build.yml | 12 +++++------- 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/install-dependencies-ubuntu/action.yml diff --git a/.github/workflows/install-dependencies-ubuntu.yml b/.github/workflows/install-dependencies-ubuntu.yml index 7bda7fc2fd..aa4597be39 100644 --- a/.github/workflows/install-dependencies-ubuntu.yml +++ b/.github/workflows/install-dependencies-ubuntu.yml @@ -4,8 +4,6 @@ on: jobs: install_dependencies: - runs-on: ubuntu-22.04 - - - uses: actions/checkout@v3 with: submodules: 'recursive' @@ -15,5 +13,5 @@ jobs: sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US sudo apt-get update sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev - - name: Install boost Ubuntu 22.04 + - name: Install boost from PPa run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev diff --git a/.github/workflows/install-dependencies-ubuntu/action.yml b/.github/workflows/install-dependencies-ubuntu/action.yml new file mode 100644 index 0000000000..555fc5dbcd --- /dev/null +++ b/.github/workflows/install-dependencies-ubuntu/action.yml @@ -0,0 +1,14 @@ +name: "Install dependencies via apt" +description: "dummy description" + +runs: + using: "composite" + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev + shell: bash + - name: Install boost from PPa + run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev + shell: bash diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 51f097e840..17559f60d0 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -12,13 +12,6 @@ concurrency: cancel-in-progress: true jobs: - checkout: - uses: actions/checkout@v3 - with: - submodules: 'recursive' - install-dependencies: - uses: ./.github/workflows/install-dependencies-ubuntu.yml - build: # The CMake configure and build commands are platform-agnostic and should work equally # well on Windows or Mac. You can convert this to a matrix build if you need @@ -64,6 +57,11 @@ jobs: steps: + - uses: actions/checkout@v3 + with: + submodules: 'recursive' + - name: install-dependencies + uses: ./.github/workflows/install-dependencies-ubuntu - name: Install gcc 11 run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 if : matrix.compiler == 'gcc' && matrix.compiler-version == 11 From 6980791eb7398418121db46a5b28542d2682d19a Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 12:56:25 +0100 Subject: [PATCH 04/10] also add an action for the compiler installation --- .../install-compiler-ubuntu/action.yml | 43 +++++++++++++++++++ .../install-dependencies-ubuntu/action.yml | 3 ++ .github/workflows/native-build.yml | 30 +++---------- 3 files changed, 52 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/install-compiler-ubuntu/action.yml diff --git a/.github/workflows/install-compiler-ubuntu/action.yml b/.github/workflows/install-compiler-ubuntu/action.yml new file mode 100644 index 0000000000..867c2cd5da --- /dev/null +++ b/.github/workflows/install-compiler-ubuntu/action.yml @@ -0,0 +1,43 @@ +name: "Install various versions of gcc and clang" +description: "dummy description" +inputs: + compiler: + description: "Must be `gcc` or `clang`" + required: true + compiler-version: + description: "the version of the compiler (must be major version)" + required: true + +runs: + using: "composite" + steps: + - name: Add PPA for GCC + run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update + shell: bash + if : inputs.compiler == 'gcc' + + - name: Install gcc 11 + run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 + if : inputs.compiler == 'gcc' && inputs.compiler-version == 11 + shell: bash + - name: Install gcc 12 + run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-12 g++-12 + if : inputs.compiler == 'gcc' && inputs.compiler-version == 12 + shell: bash + - name: Install gcc 13 + run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13 + if : inputs.compiler == 'gcc' && inputs.compiler-version == 13 + shell: bash + - name: Install clang + # The sed command fixes a bug in `llvm.sh` in combination with the latest version of + # `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted + # immediately after. + run: | + wget https://apt.llvm.org/llvm.sh + sudo chmod +x llvm.sh + sed 's/apt-key del/echo/' llvm.sh -iy + sudo ./llvm.sh ${{inputs.compiler-version}} + sudo apt install -y clang-${{inputs.compiler-version}} + if : inputs.compiler == 'clang' + shell: bash +# TODO Add assertion for unsupported compiler version. \ No newline at end of file diff --git a/.github/workflows/install-dependencies-ubuntu/action.yml b/.github/workflows/install-dependencies-ubuntu/action.yml index 555fc5dbcd..4f7a8a2d9a 100644 --- a/.github/workflows/install-dependencies-ubuntu/action.yml +++ b/.github/workflows/install-dependencies-ubuntu/action.yml @@ -12,3 +12,6 @@ runs: - name: Install boost from PPa run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev shell: bash + - name: Install python packages for E2E tests + run: sudo apt-get install python3-yaml unzip pkg-config python3-icu + shell: bash diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index 17559f60d0..c89d62e56b 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -60,31 +60,13 @@ jobs: - uses: actions/checkout@v3 with: submodules: 'recursive' - - name: install-dependencies + - name: Install dependencies uses: ./.github/workflows/install-dependencies-ubuntu - - name: Install gcc 11 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 - if : matrix.compiler == 'gcc' && matrix.compiler-version == 11 - - name: Install gcc 12 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-12 g++-12 - if : matrix.compiler == 'gcc' && matrix.compiler-version == 12 - - - name: Install gcc 13 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13 - if : matrix.compiler == 'gcc' && matrix.compiler-version == 13 - - - name: Install clang - # The sed command fixes a bug in `llvm.sh` in combination with the latest version of - # `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted - # immediately after. - run: | - wget https://apt.llvm.org/llvm.sh - sudo chmod +x llvm.sh - sed 's/apt-key del/echo/' llvm.sh -iy - sudo ./llvm.sh ${{matrix.compiler-version}} - sudo apt install -y clang-${{matrix.compiler-version}} - if : matrix.compiler == 'clang' - + - name: Install compiler + uses: ./.github/workflows/install-compiler-ubuntu + with: + compiler: matrix.compiler + compiler-version: matrix.compiler-version - name: Python dependencies run: sudo apt-get install python3-yaml unzip pkg-config python3-icu From 3505941f2816478dbe9b6d4fe56c4ced43d5675a Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 13:02:28 +0100 Subject: [PATCH 05/10] another try --- .github/workflows/install-compiler-ubuntu/action.yml | 7 +++---- .github/workflows/native-build.yml | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/install-compiler-ubuntu/action.yml b/.github/workflows/install-compiler-ubuntu/action.yml index 867c2cd5da..a8ce3b4597 100644 --- a/.github/workflows/install-compiler-ubuntu/action.yml +++ b/.github/workflows/install-compiler-ubuntu/action.yml @@ -15,17 +15,16 @@ runs: run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update shell: bash if : inputs.compiler == 'gcc' - - name: Install gcc 11 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 + run : sudo apt install -y gcc-11 g++-11 if : inputs.compiler == 'gcc' && inputs.compiler-version == 11 shell: bash - name: Install gcc 12 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-12 g++-12 + run : sudo apt install -y gcc-12 g++-12 if : inputs.compiler == 'gcc' && inputs.compiler-version == 12 shell: bash - name: Install gcc 13 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13 + run : sudo apt install -y gcc-13 g++-13 if : inputs.compiler == 'gcc' && inputs.compiler-version == 13 shell: bash - name: Install clang diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml index c89d62e56b..ca86e221be 100644 --- a/.github/workflows/native-build.yml +++ b/.github/workflows/native-build.yml @@ -65,10 +65,8 @@ jobs: - name: Install compiler uses: ./.github/workflows/install-compiler-ubuntu with: - compiler: matrix.compiler - compiler-version: matrix.compiler-version - - name: Python dependencies - run: sudo apt-get install python3-yaml unzip pkg-config python3-icu + compiler: ${{matrix.compiler}} + compiler-version: ${{matrix.compiler-version}} - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From 98acc1c1b3372e401a6451b59c89842d7b879bf9 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 13:24:51 +0100 Subject: [PATCH 06/10] Reuse the new actions for all workflow runs where they apply. --- .github/workflows/check_index_version.yml | 18 ++++-------- .github/workflows/code-coverage.yml | 29 +++++-------------- .../install-dependencies-ubuntu/action.yml | 16 ++++++++-- .github/workflows/native-build-conan.yml | 9 ++---- .github/workflows/upload-sonarcloud.yml | 22 ++++---------- 5 files changed, 37 insertions(+), 57 deletions(-) diff --git a/.github/workflows/check_index_version.yml b/.github/workflows/check_index_version.yml index 896ab0ec7b..a58f4c11d2 100644 --- a/.github/workflows/check_index_version.yml +++ b/.github/workflows/check_index_version.yml @@ -36,18 +36,12 @@ jobs: ref: 'master' - name: Install dependencies - run: | - sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev - - name: Install boost Ubuntu 22.04 - run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev - - name: Install gcc 11 - run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 - - - name: Python dependencies - run: sudo apt-get install python3-yaml unzip pkg-config python3-icu - + uses: ./.github/workflows/install-dependencies-ubuntu + - name: Install compiler + uses: ./.github/workflows/install-compiler-ubuntu + with: + compiler: {{matrix.compiler}} + compiler-version: ${{matrix.compiler-version}} - name: Configure CMake Master working-directory: ${{github.workspace}}/master run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DCMAKE_TOOLCHAIN_FILE="$(pwd)/toolchains/${{matrix.compiler}}${{matrix.compiler-version}}.cmake" -DADDITIONAL_COMPILER_FLAGS="${{matrix.warnings}} ${{matrix.asan-flags}} ${{matrix.ubsan-flags}}" -DUSE_PARALLEL=true -DRUN_EXPENSIVE_TESTS=true -DENABLE_EXPENSIVE_CHECKS=true diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index c1bce45aea..e1df7528d6 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -42,32 +42,19 @@ jobs: submodules: "recursive" - name: Install dependencies - run: | - sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - - name: Install clang 16 - # The sed command fixes a bug in `llvm.sh` in combination with the latest version of - # `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted - # immediately after. + uses: ./.github/workflows/install-dependencies-ubuntu + - name: Install compiler + uses: ./.github/workflows/install-compiler-ubuntu + with: + compiler: "clang" + compiler-version: "16" + - name: Install coverage tools run: | - wget https://apt.llvm.org/llvm.sh - sudo chmod +x llvm.sh - sed 's/apt-key del/echo/' llvm.sh -iy - sudo ./llvm.sh 16 - sudo apt install -y clang-16 llvm-16 + sudo apt install -y llvm-16 - name: Show path run: | which llvm-profdata-16 which llvm-cov-16 - - name: Install dependencies - run: | - sudo gem install apt-spy2 - sudo apt-spy2 fix --commit --launchpad --country=US - sudo add-apt-repository -y ppa:mhier/libboost-latest - sudo apt-get update - sudo apt-get install -y libicu-dev tzdata libzstd-dev libjemalloc-dev libboost1.81-all-dev libboost-url1.81-dev - - name: Python dependencies - run: sudo apt-get install python3-yaml unzip pkg-config python3-icu python3-pip - name: Create build directory run: mkdir ${{github.workspace}}/build - name: Configure CMake diff --git a/.github/workflows/install-dependencies-ubuntu/action.yml b/.github/workflows/install-dependencies-ubuntu/action.yml index 4f7a8a2d9a..c351bfa7cd 100644 --- a/.github/workflows/install-dependencies-ubuntu/action.yml +++ b/.github/workflows/install-dependencies-ubuntu/action.yml @@ -1,16 +1,28 @@ name: "Install dependencies via apt" description: "dummy description" +inputs: + install-third-party-libraries: + description: "Should be set to false for conan builds" + required: true + default: "true" + runs: using: "composite" steps: - - name: Install dependencies + - name: Install basic compiler run: | sudo apt-get update - sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev + sudo apt-get install -y build-essential + shell: bash + - name: Install third-party libraries + run: | + sudo apt-get install -y libicu-dev tzdata libzstd-dev libjemalloc-dev shell: bash + if: inputs.install-third-party-libraries == "true" - name: Install boost from PPa run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev + if: inputs.install-third-party-libraries == "true" shell: bash - name: Install python packages for E2E tests run: sudo apt-get install python3-yaml unzip pkg-config python3-icu diff --git a/.github/workflows/native-build-conan.yml b/.github/workflows/native-build-conan.yml index 7fd3cb873a..695c364e00 100644 --- a/.github/workflows/native-build-conan.yml +++ b/.github/workflows/native-build-conan.yml @@ -31,13 +31,10 @@ jobs: submodules: 'recursive' - name: Install dependencies - run: | - sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - sudo apt-get install build-essential + uses: ./.github/workflows/install-dependencies-ubuntu + with: + install-third-party-libraries: "false" - - name: Python dependencies - run: sudo apt-get install python3-yaml unzip pkg-config python3-icu - name: Create build directory run: mkdir ${{github.workspace}}/build - name: Install and run conan diff --git a/.github/workflows/upload-sonarcloud.yml b/.github/workflows/upload-sonarcloud.yml index cb48a6cdc3..71d63ef93e 100644 --- a/.github/workflows/upload-sonarcloud.yml +++ b/.github/workflows/upload-sonarcloud.yml @@ -112,22 +112,12 @@ jobs: - name: Install sonar-scanner and build-wrapper uses: SonarSource/sonarcloud-github-c-cpp@v2 - name: Install dependencies - run: | - sudo gem install apt-spy2 - sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev - - name: Install boost Ubuntu 22.04 - run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev - - name: Install clang 16 - # The sed command fixes a bug in `llvm.sh` in combination with the latest version of - # `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted - # immediately after. - run: | - wget https://apt.llvm.org/llvm.sh - sudo chmod +x llvm.sh - sed 's/apt-key del/echo/' llvm.sh -iy - sudo ./llvm.sh 16 all + uses: ./.github/workflows/install-dependencies-ubuntu + - name: Install compiler + uses: ./.github/workflows/install-compiler-ubuntu + with: + compiler: ${{env.compiler}} + compiler-version: ${{env.compiler-version}} - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From 7b7eed1b74f8bc97097b56d5e9ef0641c3c22ee4 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 13:29:07 +0100 Subject: [PATCH 07/10] Try to fix the build --- .github/workflows/install-dependencies-ubuntu/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-dependencies-ubuntu/action.yml b/.github/workflows/install-dependencies-ubuntu/action.yml index c351bfa7cd..b57fa7177a 100644 --- a/.github/workflows/install-dependencies-ubuntu/action.yml +++ b/.github/workflows/install-dependencies-ubuntu/action.yml @@ -19,10 +19,10 @@ runs: run: | sudo apt-get install -y libicu-dev tzdata libzstd-dev libjemalloc-dev shell: bash - if: inputs.install-third-party-libraries == "true" + if: inputs.install-third-party-libraries == 'true' - name: Install boost from PPa run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev - if: inputs.install-third-party-libraries == "true" + if: inputs.install-third-party-libraries == 'true' shell: bash - name: Install python packages for E2E tests run: sudo apt-get install python3-yaml unzip pkg-config python3-icu From c2ae35869a9798b58d5b1848c174b137a200d029 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 13:35:41 +0100 Subject: [PATCH 08/10] Another update of the action. --- .../workflows/install-compiler-ubuntu/action.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/install-compiler-ubuntu/action.yml b/.github/workflows/install-compiler-ubuntu/action.yml index a8ce3b4597..3b796d0f35 100644 --- a/.github/workflows/install-compiler-ubuntu/action.yml +++ b/.github/workflows/install-compiler-ubuntu/action.yml @@ -15,17 +15,9 @@ runs: run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update shell: bash if : inputs.compiler == 'gcc' - - name: Install gcc 11 - run : sudo apt install -y gcc-11 g++-11 - if : inputs.compiler == 'gcc' && inputs.compiler-version == 11 - shell: bash - - name: Install gcc 12 - run : sudo apt install -y gcc-12 g++-12 - if : inputs.compiler == 'gcc' && inputs.compiler-version == 12 - shell: bash - - name: Install gcc 13 - run : sudo apt install -y gcc-13 g++-13 - if : inputs.compiler == 'gcc' && inputs.compiler-version == 13 + - name: Install gcc + run : sudo apt install -y gcc-${{inputs.compiler-version}} g++-${{inputs.compiler-version}} + if : inputs.compiler == 'gcc' shell: bash - name: Install clang # The sed command fixes a bug in `llvm.sh` in combination with the latest version of From 47d98165adb38720ef34e51af684e2e2bc197e32 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 13:36:22 +0100 Subject: [PATCH 09/10] Delete the unused file. --- .../workflows/install-dependencies-ubuntu.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/workflows/install-dependencies-ubuntu.yml diff --git a/.github/workflows/install-dependencies-ubuntu.yml b/.github/workflows/install-dependencies-ubuntu.yml deleted file mode 100644 index aa4597be39..0000000000 --- a/.github/workflows/install-dependencies-ubuntu.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Install dependencies ubuntu -on: - workflow_call: - -jobs: - install_dependencies: - - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - - name: Install dependencies - run: | - sudo gem install apt-spy2 && sudo apt-spy2 fix --commit --launchpad --country=US - sudo apt-get update - sudo apt-get install -y libicu-dev tzdata gcc-10 libzstd-dev libjemalloc-dev - - name: Install boost from PPa - run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev From 8e9dece5d88dee5ee1671f7fa8b8287015978f88 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 11 Dec 2023 20:28:36 +0100 Subject: [PATCH 10/10] Small changes --- .github/workflows/install-compiler-ubuntu/action.yml | 11 +++++++---- .../workflows/install-dependencies-ubuntu/action.yml | 9 ++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/install-compiler-ubuntu/action.yml b/.github/workflows/install-compiler-ubuntu/action.yml index 3b796d0f35..6a13cbe852 100644 --- a/.github/workflows/install-compiler-ubuntu/action.yml +++ b/.github/workflows/install-compiler-ubuntu/action.yml @@ -12,14 +12,17 @@ runs: using: "composite" steps: - name: Add PPA for GCC + if : inputs.compiler == 'gcc' run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update shell: bash - if : inputs.compiler == 'gcc' + - name: Install gcc - run : sudo apt install -y gcc-${{inputs.compiler-version}} g++-${{inputs.compiler-version}} if : inputs.compiler == 'gcc' + run : sudo apt install -y gcc-${{inputs.compiler-version}} g++-${{inputs.compiler-version}} shell: bash + - name: Install clang + if : inputs.compiler == 'clang' # The sed command fixes a bug in `llvm.sh` in combination with the latest version of # `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted # immediately after. @@ -29,6 +32,6 @@ runs: sed 's/apt-key del/echo/' llvm.sh -iy sudo ./llvm.sh ${{inputs.compiler-version}} sudo apt install -y clang-${{inputs.compiler-version}} - if : inputs.compiler == 'clang' shell: bash -# TODO Add assertion for unsupported compiler version. \ No newline at end of file + +# TODO Add assertion for unsupported compilers and versions. diff --git a/.github/workflows/install-dependencies-ubuntu/action.yml b/.github/workflows/install-dependencies-ubuntu/action.yml index b57fa7177a..b5c248dfed 100644 --- a/.github/workflows/install-dependencies-ubuntu/action.yml +++ b/.github/workflows/install-dependencies-ubuntu/action.yml @@ -15,15 +15,18 @@ runs: sudo apt-get update sudo apt-get install -y build-essential shell: bash + - name: Install third-party libraries + if: inputs.install-third-party-libraries == 'true' run: | sudo apt-get install -y libicu-dev tzdata libzstd-dev libjemalloc-dev shell: bash + + - name: Install boost from PPA if: inputs.install-third-party-libraries == 'true' - - name: Install boost from PPa run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt install -y libboost1.81-all-dev libboost-url1.81-dev - if: inputs.install-third-party-libraries == 'true' shell: bash - - name: Install python packages for E2E tests + + - name: Install Python packages for E2E tests run: sudo apt-get install python3-yaml unzip pkg-config python3-icu shell: bash