From d933ce2a29b06439b9b26b78314285de3dba7921 Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Tue, 12 Dec 2023 16:03:08 +0000 Subject: [PATCH] Use clio_ci docker image (#1033) Fixes #884 --- .github/actions/prepare_runner/action.yml | 26 ----------------------- .github/actions/setup_conan/action.yml | 3 --- .github/workflows/build.yml | 14 +++++++----- .github/workflows/clang-tidy.yml | 7 +++--- .github/workflows/nightly.yml | 8 +------ 5 files changed, 13 insertions(+), 45 deletions(-) diff --git a/.github/actions/prepare_runner/action.yml b/.github/actions/prepare_runner/action.yml index 300841e0..fe593ef7 100644 --- a/.github/actions/prepare_runner/action.yml +++ b/.github/actions/prepare_runner/action.yml @@ -13,32 +13,6 @@ runs: run: | brew install llvm@14 pkg-config ninja bison cmake ccache jq gh - - name: Install packages on linux - if: ${{ runner.os == 'Linux' }} - shell: bash - run: | - echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main' >> /etc/apt/sources.list - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - - apt update -qq - apt install -y jq clang-tidy-17 clang-tools-17 - - - name: Install gh on Linux - if: ${{ runner.os == 'Linux' }} - shell: bash - run: | - wget https://github.com/cli/cli/releases/download/v2.40.0/gh_2.40.0_linux_amd64.tar.gz - tar xf gh_2.40.0_linux_amd64.tar.gz - sudo mv gh_2.40.0_linux_amd64/bin/gh /usr/bin/gh - rm -r gh_2.40.0_linux_amd64* - - - name: Install ccache on Linux - if: ${{ runner.os == 'Linux' && inputs.disable_ccache != 'true' }} - shell: bash - run: | - wget https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz - tar xf ./ccache-4.8.3-linux-x86_64.tar.xz - mv ./ccache-4.8.3-linux-x86_64/ccache /usr/bin/ccache - - name: Fix git permissions on Linux if: ${{ runner.os == 'Linux' }} shell: bash diff --git a/.github/actions/setup_conan/action.yml b/.github/actions/setup_conan/action.yml index 470fe9af..af2e95e1 100644 --- a/.github/actions/setup_conan/action.yml +++ b/.github/actions/setup_conan/action.yml @@ -31,9 +31,6 @@ runs: shell: bash id: conan_setup_linux run: | - conan profile new default --detect - conan profile update settings.compiler.cppstd=20 default - conan profile update settings.compiler.libcxx=libstdc++11 default echo "created_conan_profile=default" >> $GITHUB_OUTPUT - name: Export output variable diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f85078a..42591734 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,8 +25,7 @@ jobs: include: - os: Linux container: - image: conanio/gcc11:1.61.0 - options: --user root + image: rippleci/clio_ci:latest - os: macOS runs-on: [self-hosted, "${{ matrix.os }}"] container: ${{ matrix.container }} @@ -59,7 +58,6 @@ jobs: conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }} build_type: 'Release' - - name: Build Clio uses: ./.github/actions/build_clio @@ -81,6 +79,13 @@ jobs: name: clio_tests_${{ runner.os }} path: build/clio_tests + - name: Upload compile_commans + if: ${{ runner.os == 'macOS' }} + uses: actions/upload-artifact@v3 + with: + name: compile_commans_${{ runner.os }} + path: build/compile_commands.json + - name: Save cache uses: ./.github/actions/save_cache with: @@ -99,8 +104,7 @@ jobs: include: - os: Linux container: - image: conanio/gcc11:1.61.0 - options: --user root + image: rippleci/clio_ci:latest - os: macOS runs-on: [self-hosted, "${{ matrix.os }}"] container: ${{ matrix.container }} diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 67624fd7..8497fa78 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -13,8 +13,7 @@ jobs: clang_tidy: runs-on: [self-hosted, Linux] container: - image: conanio/gcc11:1.61.0 - options: --user root + image: rippleci/clio_ci:latest permissions: contents: write issues: write @@ -68,7 +67,7 @@ jobs: rm output.txt - name: Create an issue - if: ${{ steps.run_clang_tidy.outcome != 'success' }} + if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name == 'schedule' }} id: create_issue shell: bash env: @@ -82,7 +81,7 @@ jobs: rm create_issue.log issue.md - name: Create PR with fixes - if: ${{ steps.run_clang_tidy.outcome != 'success' }} + if: ${{ steps.run_clang_tidy.outcome != 'success' && github.event_name == 'schedule' }} uses: peter-evans/create-pull-request@v5 env: GH_REPO: ${{ github.repository }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c59b80b8..b6b250f4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,13 +16,11 @@ jobs: - os: Linux build_type: Release container: - image: conanio/gcc11:1.61.0 - options: --user root + image: rippleci/clio_ci:latest - os: Linux build_type: Debug container: image: conanio/gcc11:1.61.0 - options: --user root runs-on: [self-hosted, "${{ matrix.os }}"] container: ${{ matrix.container }} @@ -36,7 +34,6 @@ jobs: with: disable_ccache: true - - name: Setup conan uses: ./.github/actions/setup_conan id: conan @@ -139,6 +136,3 @@ jobs: gh release create nightly --prerelease --title "Clio development (nightly) build" \ --target $GITHUB_SHA --notes-file "${RUNNER_TEMP}/nightly_notes.md" \ ./nightly_release/clio_server* - - -