Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor workflows + revert to standard apt #1185

Merged
merged 10 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/check_index_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/install-compiler-ubuntu/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
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
# `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<joka921> Add assertion for unsupported compiler version.
29 changes: 29 additions & 0 deletions .github/workflows/install-dependencies-ubuntu/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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 basic compiler
run: |
sudo apt-get update
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
shell: bash
9 changes: 3 additions & 6 deletions .github/workflows/native-build-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 7 additions & 33 deletions .github/workflows/native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,14 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

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
- 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: 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
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/upload-sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down