From b12e0a2a1577a1f72d9dd40188f1aa06f1a16b15 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 21 Jan 2025 13:34:22 -0800 Subject: [PATCH] Fix CI after GHA Update to Ubuntu 24.04 (#1781) Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1781 This new image removed preinstalled libc++, and the ability to install old version of Clang Format we were installing. This manually installs libc++ when setting up Clang jobs, and fully removes the clang-format validation job, since it wasn't correctly running before, and it's probably more a pain to ask people to run this than to just run Arcanist when importing a change. Changelog: [Internal] Reviewed By: joevilches Differential Revision: D68455129 fbshipit-source-id: b5767be832b2b5d46db7e60e18b66823819ba15a --- .github/actions/clang-format/action.yml | 23 ----------------------- .github/actions/setup-cpp/action.yml | 1 + .github/workflows/validate-cpp.yml | 10 ---------- 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/actions/clang-format/action.yml diff --git a/.github/actions/clang-format/action.yml b/.github/actions/clang-format/action.yml deleted file mode 100644 index b81af54f..00000000 --- a/.github/actions/clang-format/action.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Clang Format -inputs: - directory: - description: Directory to Lint - required: true - version: - description: LLVM version to use # Should be kept roughly in sync with arcanist - required: false - default: 12 - -runs: - using: "composite" - steps: - - name: Install - shell: bash - run: sudo apt-get install -y clang-format-${{ inputs.version }} - - - name: clang-format - working-directory: ${{ inputs.directory }} - shell: bash - env: - BASHOPTS: extglob:nullglob - run: clang-format-${{ inputs.version }} --dry-run --Werror **/*.{h,hh,hpp,c,cpp,cc,m,mm} diff --git a/.github/actions/setup-cpp/action.yml b/.github/actions/setup-cpp/action.yml index 4f618267..f3aece30 100644 --- a/.github/actions/setup-cpp/action.yml +++ b/.github/actions/setup-cpp/action.yml @@ -16,6 +16,7 @@ runs: if: ${{ inputs.toolchain == 'Clang' }} shell: bash run: | + sudo apt-get install -y libc++-dev libc++abi-dev echo "CC=/usr/bin/clang" >> $GITHUB_ENV echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV diff --git a/.github/workflows/validate-cpp.yml b/.github/workflows/validate-cpp.yml index e2c159d1..666c1195 100644 --- a/.github/workflows/validate-cpp.yml +++ b/.github/workflows/validate-cpp.yml @@ -97,13 +97,3 @@ jobs: cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release cmake --build build working-directory: capture - - clang-format: - name: Format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: clang-format - uses: ./.github/actions/clang-format