diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index e86c5f5f..e796532f 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -13,7 +13,7 @@ on: - "**" jobs: - macos-11: + macos: name: LLVM ${{ matrix.LLVM_VERSION }} runs-on: macos-latest strategy: diff --git a/.github/workflows/ci-ubuntu-22.04.yml b/.github/workflows/ci-ubuntu-22.04.yml deleted file mode 100644 index 88325a32..00000000 --- a/.github/workflows/ci-ubuntu-22.04.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Ubuntu 22.04 CI - -env: - CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -on: - pull_request: - push: - branches: - - main - tags: - - "**" - -jobs: - ubuntu-20-04: - name: LLVM ${{ matrix.LLVM_VERSION }} - runs-on: ubuntu-latest - container: ubuntu:22.04 - strategy: - matrix: - LLVM_VERSION: [13, 14, 15] - env: - DISTR_REPO: "ubuntu/jammy" - DEBIAN_FRONTEND: noninteractive - - steps: - - name: Debugging - run: | - env | sort - cat $GITHUB_EVENT_PATH - - - name: Install software - run: | - apt-get update && apt-get install -y software-properties-common - add-apt-repository ppa:git-core/ppa - apt-get update && apt-get install -y python3-pip curl git libunwind8 - pip3 install ansible - - - name: Install git - run: | - apt-get update - apt-get install -y git - git config --global --add safe.directory $PWD - - - name: Checkout sources - uses: actions/checkout@v3 - with: - submodules: true - - - uses: ./actions/detect-package-metadata - id: metadata - - - name: Run CI task - run: | - cd infrastructure && \ - ansible-playbook ubuntu-playbook.yaml \ - -e llvm_version="${{ matrix.LLVM_VERSION }}" \ - -e source_dir=$PWD/.. \ - -e gitref=$GITHUB_SHA \ - -e host=localhost \ - -e mull_version=${{ steps.metadata.outputs.version }}${{ steps.metadata.outputs.suffix }} \ - --verbose - - - name: Publish package - if: env.CLOUDSMITH_API_KEY != null - run: | - cloudsmith push deb \ - mull-project/mull-${{ steps.metadata.outputs.channel }}/${{ env.DISTR_REPO }} \ - infrastructure/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb - - - name: Move package - run: | - mkdir -p /tmp/packages - mv infrastructure/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb /tmp/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb - - - uses: ./actions/attach-package - with: - GH_API_KEY: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-ubuntu-20.04.yml b/.github/workflows/ci-ubuntu.yml similarity index 62% rename from .github/workflows/ci-ubuntu-20.04.yml rename to .github/workflows/ci-ubuntu.yml index c247624c..ca422caf 100644 --- a/.github/workflows/ci-ubuntu-20.04.yml +++ b/.github/workflows/ci-ubuntu.yml @@ -1,4 +1,4 @@ -name: Ubuntu 20.04 CI +name: Ubuntu CI env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} @@ -13,16 +13,27 @@ on: - "**" jobs: - ubuntu-20-04: - name: LLVM ${{ matrix.LLVM_VERSION }} + ubuntu: + name: Ubuntu ${{ matrix.UBUNTU_VERSION }} LLVM ${{ matrix.LLVM_VERSION }} runs-on: ubuntu-latest - container: ubuntu:20.04 + container: ubuntu:${{ matrix.UBUNTU_VERSION }} strategy: matrix: - LLVM_VERSION: [12] + UBUNTU_VERSION: ["22.04", "24.04"] + LLVM_VERSION: [14, 15] + include: + - UBUNTU_VERSION: "20.04" + LLVM_VERSION: 12 + - UBUNTU_VERSION: "22.04" + LLVM_VERISON: 13 + - UBUNTU_VERSION: "24.04" + LLVM_VERSION: 16 + - UBUNTU_VERSION: "24.04" + LLVM_VERSION: 17 env: - DISTR_REPO: "ubuntu/focal" DEBIAN_FRONTEND: noninteractive + # Necessary for Ubuntu 24.04 since PEP 668 + PIP_BREAK_SYSTEM_PACKAGES: 1 steps: - name: Debugging @@ -32,15 +43,18 @@ jobs: - name: Install software run: | - apt-get update && apt-get install -y software-properties-common - add-apt-repository ppa:git-core/ppa - apt-get update && apt-get install -y python3-pip curl git + apt-get update && apt-get install --no-install-recommends -y python3-pip curl libunwind8 pip3 install ansible + - name: Add git ppa + if: matrix.UBUNTU_VERSION != '24.04' + run: | + apt-get update && apt-get install --no-install-recommends -y gpg-agent software-properties-common + add-apt-repository ppa:git-core/ppa + - name: Install git run: | - apt-get update - apt-get install -y git + apt-get update && apt-get install --no-install-recommends -y git git config --global --add safe.directory $PWD - name: Checkout sources @@ -65,8 +79,9 @@ jobs: - name: Publish package if: env.CLOUDSMITH_API_KEY != null run: | + UBUNTU_CODENAME=$(. /etc/os-release; echo "${UBUNTU_CODENAME/*, /}") cloudsmith push deb \ - mull-project/mull-${{ steps.metadata.outputs.channel }}/${{ env.DISTR_REPO }} \ + mull-project/mull-${{ steps.metadata.outputs.channel }}/ubuntu/${UBUNTU_CODENAME} \ infrastructure/packages/`cat infrastructure/PACKAGE_FILE_NAME`.deb - name: Move package diff --git a/.github/workflows/mull-20.04.yml b/.github/workflows/mull-20.04.yml index 40dfd63a..de635cc0 100644 --- a/.github/workflows/mull-20.04.yml +++ b/.github/workflows/mull-20.04.yml @@ -1,8 +1,5 @@ name: Mull (20.04) -env: - DISTR_REPO: "ubuntu/focal" - on: pull_request: diff --git a/infrastructure/.gitignore b/infrastructure/.gitignore index 3b1fb515..a8de9a0e 100644 --- a/infrastructure/.gitignore +++ b/infrastructure/.gitignore @@ -1,4 +1,3 @@ packages PACKAGE_FILE_NAME PackageMaker.app - diff --git a/infrastructure/Vagrantfile b/infrastructure/Vagrantfile index ec4bca2f..bd3bdc10 100644 --- a/infrastructure/Vagrantfile +++ b/infrastructure/Vagrantfile @@ -137,4 +137,3 @@ Vagrant.configure(2) do |config| end end - diff --git a/infrastructure/debian-playbook.yaml b/infrastructure/debian-playbook.yaml index 2392c6b9..d49c954e 100644 --- a/infrastructure/debian-playbook.yaml +++ b/infrastructure/debian-playbook.yaml @@ -47,4 +47,3 @@ - name: Integration Tests include: helpers/integration-tests.yaml - diff --git a/infrastructure/fedora-playbook.yaml b/infrastructure/fedora-playbook.yaml index 567cd66e..86cf4c8b 100644 --- a/infrastructure/fedora-playbook.yaml +++ b/infrastructure/fedora-playbook.yaml @@ -52,4 +52,3 @@ - name: Integration Tests include: helpers/integration-tests.yaml - diff --git a/infrastructure/freebsd-playbook.yaml b/infrastructure/freebsd-playbook.yaml index 94e6e7b1..886f4561 100644 --- a/infrastructure/freebsd-playbook.yaml +++ b/infrastructure/freebsd-playbook.yaml @@ -41,4 +41,3 @@ - name: Integration Tests include: helpers/integration-tests.yaml - diff --git a/infrastructure/helpers/mull.yml b/infrastructure/helpers/mull.yml index 5f77b4d6..12a0b6b1 100644 --- a/infrastructure/helpers/mull.yml +++ b/infrastructure/helpers/mull.yml @@ -1,2 +1,2 @@ mutators: - - cxx_add_to_sub \ No newline at end of file + - cxx_add_to_sub diff --git a/infrastructure/helpers/variables.yaml b/infrastructure/helpers/variables.yaml index d103632a..fab99b17 100644 --- a/infrastructure/helpers/variables.yaml +++ b/infrastructure/helpers/variables.yaml @@ -38,6 +38,26 @@ llvm_mapping: cmake_cxx: /opt/homebrew/opt/llvm@12/bin/clang++ ubuntu: + "17": + cmake_search_paths: "/usr/lib/llvm-17/cmake/;/usr/lib/cmake/clang-17/" + packages: + - llvm-17-dev + - libclang-17-dev + - libc++-17-dev + - libc++abi-17-dev + - clang-17 + cmake_cc: clang-17 + cmake_cxx: clang++-17 + "16": + cmake_search_paths: "/usr/lib/llvm-16/cmake/;/usr/lib/cmake/clang-16/" + packages: + - llvm-16-dev + - libclang-16-dev + - libc++-16-dev + - libc++abi-16-dev + - clang-16 + cmake_cc: clang-16 + cmake_cxx: clang++-16 "15": cmake_search_paths: "/usr/lib/llvm-15/cmake/;/usr/lib/cmake/clang-15/" packages: diff --git a/infrastructure/helpers/working-directory.yaml b/infrastructure/helpers/working-directory.yaml index 028642ad..cde613f0 100644 --- a/infrastructure/helpers/working-directory.yaml +++ b/infrastructure/helpers/working-directory.yaml @@ -11,4 +11,3 @@ owner: "{{ ansible_user_id }}" recurse: true become: true - diff --git a/tests-lit/tests/filters/junk-detection/00_error_compilation_flags_database_does_not_match_real_flags/sample.cpp b/tests-lit/tests/filters/junk-detection/00_error_compilation_flags_database_does_not_match_real_flags/sample.cpp index b1e2ba7e..4ccd5f5d 100644 --- a/tests-lit/tests/filters/junk-detection/00_error_compilation_flags_database_does_not_match_real_flags/sample.cpp +++ b/tests-lit/tests/filters/junk-detection/00_error_compilation_flags_database_does_not_match_real_flags/sample.cpp @@ -30,8 +30,8 @@ RUN: %mull_runner %s-ir-with-flag.exe -reporters=IDE -ide-reporter-show-killed 2 WITHOUT-JUNK-DETECTION:{{^.*}}sample.cpp:5:13: warning: Survived: Removed the call to the function [cxx_remove_void_call]{{$}} WITH-JUNK-DETECTION-NO-FLAG-MUTATE:{{^.*}}sample.cpp:2:2: error: "FLAG is not defined" -WITH-JUNK-DETECTION-NO-FLAG-MUTATE:#error "FLAG is not defined" -WITH-JUNK-DETECTION-NO-FLAG-MUTATE: ^ +WITH-JUNK-DETECTION-NO-FLAG-MUTATE:{{^.*}}#error "FLAG is not defined" +WITH-JUNK-DETECTION-NO-FLAG-MUTATE:{{^.*}} ^ WITH-JUNK-DETECTION-NO-FLAG-MUTATE:[warning] Cannot parse file: '{{.*}}sample.cpp': WITH-JUNK-DETECTION-NO-FLAG-MUTATE:cc {{.*}}sample.cpp{{.*}} WITH-JUNK-DETECTION-NO-FLAG-MUTATE:Make sure that the flags provided to Mull are the same flags that are used for normal compilation. diff --git a/tests-lit/tests/filters/junk-detection/02_junk_detection_using_extra_flags/sample.cpp b/tests-lit/tests/filters/junk-detection/02_junk_detection_using_extra_flags/sample.cpp index 53a8a652..812c7a93 100644 --- a/tests-lit/tests/filters/junk-detection/02_junk_detection_using_extra_flags/sample.cpp +++ b/tests-lit/tests/filters/junk-detection/02_junk_detection_using_extra_flags/sample.cpp @@ -23,8 +23,8 @@ RUN: cd %S && env MULL_CONFIG=%S/mull.no_flag.yml %clang_cxx %sysroot -O0 %pass_ RUN: %mull_runner -ide-reporter-show-killed %s-ir-no-flag.exe 2>&1 | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines --check-prefix=WITH-JUNK-DETECTION-NO-FLAG WITH-JUNK-DETECTION-NO-FLAG-MUTATE:{{^.*}}sample.cpp:2:2: error: "FLAG is not defined" -WITH-JUNK-DETECTION-NO-FLAG-MUTATE:#error "FLAG is not defined" -WITH-JUNK-DETECTION-NO-FLAG-MUTATE: ^ +WITH-JUNK-DETECTION-NO-FLAG-MUTATE:{{^.*}}#error "FLAG is not defined" +WITH-JUNK-DETECTION-NO-FLAG-MUTATE:{{^.*}} ^ WITH-JUNK-DETECTION-NO-FLAG-MUTATE:[warning] Cannot parse file: '{{.*}}sample.cpp': WITH-JUNK-DETECTION-NO-FLAG-MUTATE:mull {{.*}}sample.cpp{{.*}} WITH-JUNK-DETECTION-NO-FLAG-MUTATE:Make sure that the flags provided to Mull are the same flags that are used for normal compilation.