From 0c7096672c2a0d082b5f4efab4e9cca44735c1ad Mon Sep 17 00:00:00 2001 From: Robin Holzinger Date: Thu, 2 May 2024 19:15:59 +0200 Subject: [PATCH] adjustments --- .github/actions/environment_clang.yaml | 7 +++++++ .github/workflows/workflow.yaml | 27 ++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 .github/actions/environment_clang.yaml diff --git a/.github/actions/environment_clang.yaml b/.github/actions/environment_clang.yaml new file mode 100644 index 000000000..6b2d3b3a0 --- /dev/null +++ b/.github/actions/environment_clang.yaml @@ -0,0 +1,7 @@ +name: modyn-ci-tools +channels: + - conda-forge +dependencies: + - clang-18 + - clang-tools + - clang-format-18 diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index f1f2f086e..ffc5c8f75 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -5,6 +5,10 @@ on: - main pull_request: +permissions: + contents: read + actions: read + defaults: run: shell: bash -l {0} @@ -127,25 +131,24 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest env: - CLANG_TIDY: clang-tidy-15 - RUN_CLANG_TIDY: run-clang-tidy-15 - # TODO: https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py - # TODO: how to bump run-clang-tidy? - + CLANG_TIDY: clang-tidy-18 + RUN_CLANG_TIDY: run-clang-tidy-18 steps: - uses: actions/checkout@v4 - - name: Install clang-tidy - run: | - sudo apt update - sudo apt install -y clang-tidy-15 - cmake --version + - name: Install clang environment + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: .github/actions/environment_clang.yaml + cache-environment: true - name: Setup pre-built grpc binaries uses: actions/download-artifact@v4 with: name: grpc-binaries-clang-clang++-17-Release path: ${{github.workspace}}/install + run-id: https://github.com/eth-easl/modyn/actions/runs/8914657344 # TODO: generalize + github-token: ${{secrets.GITHUB_TOKEN}} - name: Configure CMake working-directory: ${{github.workspace}} @@ -210,6 +213,8 @@ jobs: with: name: grpc-binaries-${{matrix.compiler.c}}-${{matrix.compiler.cxx}}-${{matrix.compiler.version}}-${{matrix.build-type}} path: ${{github.workspace}}/install + run-id: https://github.com/eth-easl/modyn/actions/runs/8914657344 # TODO: generalize + github-token: ${{secrets.GITHUB_TOKEN}} - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}//build @@ -289,6 +294,8 @@ jobs: with: name: grpc-binaries-clang-clang++-17-Release path: ${{github.workspace}}/install + run-id: https://github.com/eth-easl/modyn/actions/runs/8914657344 # TODO: generalize + github-token: ${{secrets.GITHUB_TOKEN}} - name: Create Build Environment run: |