From 9e1b7e04641356f0e149788eda17ceda24a79c3e Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 10 Jun 2021 20:46:21 -0700 Subject: [PATCH] [build] Fix clang-tidy and clang-format (#3429) Use the official ubuntu packages on 20.04; don't use ubuntu-latest. --- .github/workflows/lint-format.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 1194deba20..04276dfa3f 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -10,6 +10,7 @@ jobs: wpiformat: name: "wpiformat" runs-on: ubuntu-latest + container: wpilib/roborio-cross-ubuntu:2021-20.04 steps: - uses: actions/checkout@v2 - name: Fetch all history and metadata @@ -22,7 +23,10 @@ jobs: with: python-version: 3.8 - name: Install clang-format - run: sudo apt-get update -q && sudo apt-get install -y clang-format-12 + run: | + sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe' >> /etc/apt/sources.list.d/proposed-repositories.list" + sudo apt-get update -q + sudo apt-get install -y clang-format-12 - name: Install wpiformat run: pip3 install wpiformat - name: Run @@ -46,10 +50,9 @@ jobs: python-version: 3.8 - name: Install clang-tidy run: | - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 12 - sudo apt-get install -y clang-tidy-12 + sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe' >> /etc/apt/sources.list.d/proposed-repositories.list" + sudo apt-get update -q + sudo apt-get install -y clang-tidy-12 clang-format-12 - name: Install wpiformat run: pip3 install wpiformat - name: Create compile_commands.json