Skip to content

Commit

Permalink
feat: support clang-apply-replacements (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxianpeng authored Jan 11, 2024
1 parent f6d3c73 commit a2d1eff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Build
name: Build amd64

on:
push:
branches: [ master ]
paths:
- ".github/workflows/clang-tools-amd64.yml"
- ".github/workflows/build-amd64.yml"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
- name: cmake
run: cmake -S ${{ matrix.release }}/llvm -B ${{ matrix.release }}/build ${{ env.COMMON_CMAKE_ARGS }} ${{ matrix.os-cmake-args }} ${{ matrix.extra-cmake-args }}
- name: build
run: cmake --build ${{ matrix.release }}/build ${{ matrix.build-args }} --target clang-format clang-query clang-tidy
run: cmake --build ${{ matrix.release }}/build ${{ matrix.build-args }} --target clang-format clang-query clang-tidy clang-apply-replacements
- name: print dependencies
if: ${{ matrix.os == 'macosx' }}
run: otool -L ${{ matrix.release }}/build/bin/clang-format
Expand All @@ -134,17 +134,20 @@ jobs:
mv clang-format${{ matrix.dotexe }} clang-format-${{ env.suffix }}${{ matrix.dotexe }}
mv clang-query${{ matrix.dotexe }} clang-query-${{ env.suffix }}${{ matrix.dotexe }}
mv clang-tidy${{ matrix.dotexe }} clang-tidy-${{ env.suffix }}${{ matrix.dotexe }}
mv clang-apply-replacements${{ matrix.dotexe }} clang-apply-replacements-${{ env.suffix }}${{ matrix.dotexe }}
- name: create and print sha512sum
shell: bash
run: |
cd ${{ matrix.release }}${{ matrix.bindir }}
${{ matrix.shacmd }} clang-format-${{ env.suffix }} > clang-format-${{ env.suffix }}.sha512sum
${{ matrix.shacmd }} clang-query-${{ env.suffix }} > clang-query-${{ env.suffix }}.sha512sum
${{ matrix.shacmd }} clang-tidy-${{ env.suffix }} > clang-tidy-${{ env.suffix }}.sha512sum
${{ matrix.shacmd }} clang-apply-replacements-${{ env.suffix }} > clang-apply-replacements-${{ env.suffix }}.sha512sum
echo "Checksums are: "
cat clang-format-${{ env.suffix }}.sha512sum
cat clang-query-${{ env.suffix }}.sha512sum
cat clang-tidy-${{ env.suffix }}.sha512sum
cat clang-apply-replacements-${{ env.suffix }}.sha512sum
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# 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)
[![Build](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/build-amd64.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/build-amd64.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)
![](https://img.shields.io/badge/platform-linux--64%20%7C%20win--64%20%7C%20osx--64%20-blue)

Includes clang-format, clang-tidy and clang-query.
Includes clang-format, clang-tidy, clang-query and clang-apply-replacements.

The supported versions are as follows:

|OS/Version |17|16|15|14|13|12|11|10|9|8|7|
|---|---|---|---|---|---|---|---|---|---|---|---|
|Linux 64|✔️|✔️|✔️|✔️|✔️|✔️|✔️|✔️| ✔️|✔️|✔️|✔️|
|Window 64|✔️|✔️|✔️|✔️|✔️|✔️|✔️|✔️| ✔️|✔️|✔️|✔️|
|macOS 64|✔️|✔️|✔️|✔️|✔️|✔️|✔️|✔️| ✔️|✔️|✔️|✔️|

## Download

Expand All @@ -21,6 +29,8 @@ These binaries aim to:
- be as small as possible
- not require any additional dependencies apart from OS itself

This repository ([cpp-linter/clang-tools-static-binaries](https://github.com/cpp-linter/clang-tools-static-binaries)) is forked from [muttleyxd/clang-tools-static-binaries](https://github.com/muttleyxd/clang-tools-static-binaries).

## How can I trust this repository?

- Verify sha512sums of binaries against output from GitHub Actions to make sure binaries are not modified
Expand Down

0 comments on commit a2d1eff

Please sign in to comment.