diff --git a/.github/workflows/clang-tools-amd64.yml b/.github/workflows/build.yml similarity index 99% rename from .github/workflows/clang-tools-amd64.yml rename to .github/workflows/build.yml index 0906449..cc7584a 100644 --- a/.github/workflows/clang-tools-amd64.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: clang-tools-static-amd64 +name: Build on: push: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..eb1578f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +on: + workflow_dispatch: + +jobs: + install: + runs-on: ${{ matrix.os }} + strategy: + matrix: + clang-version: [ 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ] + os: [ ubuntu-latest, macos-latest, windows-latest ] + include: + - os: ubuntu-latest + pattern: linux-amd64 + - os: macos-latest + pattern: macosx-amd64 + - os: windows-latest + pattern: windows-amd64.exe + fail-fast: false + env: + GH_TOKEN: ${{ secrets.TOKEN }} + bin_suffix: '${{ matrix.clang-version }}_${{ matrix.pattern }}' + steps: + - uses: actions/checkout@v4 + - name: Download and check clang version + shell: bash + run: | + gh release download --pattern 'clang-format-${{ env.bin_suffix }}' + chmod +x clang-format-${{ env.bin_suffix }} + echo "== Output clang-format version" + ./clang-format-${{ env.bin_suffix }} --version + + gh release download --pattern 'clang-tidy-${{ env.bin_suffix }}' + chmod +x clang-tidy-${{ env.bin_suffix }} + echo "== Output clang-tidy version" + ./clang-tidy-${{ env.bin_suffix }} --version + + gh release download --pattern 'clang-query-${{ env.bin_suffix }}' + chmod +x clang-query-${{ env.bin_suffix }} + echo "== Output clang-query version" + ./clang-query-${{ env.bin_suffix }} --version diff --git a/README.md b/README.md index f8bee1d..a920863 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # clang-tools static binaries +[![Build](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/build.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/build.yml) +[![Test](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/test.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/test.yml) + Includes clang-format, clang-tidy and clang-query. ## Download