Skip to content

Commit

Permalink
feat: remove old versions (#3)
Browse files Browse the repository at this point in the history
* feat: remove old versions and clang-query

* support workflow_dispatch trigger

* add dependabot and update runner

* add clang-query back

* remove code instead of comment out
  • Loading branch information
shenxianpeng authored Dec 25, 2023
1 parent 8f72ab3 commit fe40ca4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 43 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
33 changes: 4 additions & 29 deletions .github/workflows/clang-tools-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@ name: clang-tools-static-amd64
on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
build:
strategy:
matrix:
clang-version: [ 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ]
clang-version: [ 7, 8, 9, 10, 11, 12, 12.0.1, 13, 14, 15, 16, 17 ]
os: [ linux, macosx, windows ]
include:
- clang-version: 3.9
release: llvm-project-3.9.1
- clang-version: 4
release: llvm-project-4.0.1
- clang-version: 5
release: llvm-project-5.0.2
- clang-version: 6
release: llvm-project-6.0.1
- clang-version: 7
release: llvm-project-7.1.0
- clang-version: 8
Expand Down Expand Up @@ -47,15 +40,15 @@ jobs:
- clang-version: 17
release: llvm-project-17.0.4.src
- os: linux
runner: ubuntu-20.04
runner: ubuntu-22.04
os-cmake-args: '-DLLVM_BUILD_STATIC=ON -DCMAKE_CXX_FLAGS="-s -flto" ${POSIX_CMAKE_ARGS}'
build-args: '-j$(nproc)'
bindir: '/build/bin'
dotexe: ''
shacmd: 'sha512sum'
- os: macosx
runner: macos-11
os-cmake-args: '-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -flto" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 ${POSIX_CMAKE_ARGS}'
os-cmake-args: '-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -flto" -DCMAKE_OSX_DEPLOYMENT_TARGET=11 ${POSIX_CMAKE_ARGS}'
build-args: '-j$(sysctl -n hw.ncpu)'
bindir: '/build/bin'
dotexe: ''
Expand All @@ -81,14 +74,6 @@ jobs:
# the commit hash of this repository into the clang binaries
shell: bash
run: curl -L https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | tar xvz --strip 1
- name: get llvm-project
if: ${{ matrix.clang-version < 7 }}
shell: bash
run: |
version=${RELEASE##llvm-project-}
curl -LO https://releases.llvm.org/${version}/llvm-${version}.src.tar.xz
curl -LO https://releases.llvm.org/${version}/cfe-${version}.src.tar.xz
curl -LO https://releases.llvm.org/${version}/clang-tools-extra-${version}.src.tar.xz
- name: get llvm-project
if: ${{ matrix.clang-version == 7 || matrix.clang-version == 8 }}
shell: bash
Expand Down Expand Up @@ -116,21 +101,11 @@ jobs:
mv llvm-${version}.src ${{ matrix.release }}/llvm
mv cfe-${version}.src ${{ matrix.release }}/clang
mv clang-tools-extra-${version}.src ${{ matrix.release }}/clang-tools-extra
- name: move clang 3.9 sources
if: ${{ matrix.clang-version == 3.9 }}
run: |
mv ${{ matrix.release }}/clang ${{ matrix.release }}/llvm/tools/clang
mv ${{ matrix.release }}/clang-tools-extra ${{ matrix.release }}/llvm/tools/clang/tools/extra
- name: unpack llvm-project
if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
shell: bash
run: |
tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }}
- name: patch clang-3.9 constify operator
if: ${{ matrix.clang-version == 3.9 && matrix.os == 'windows' }}
shell: bash
run: patch ${{ matrix.release }}/llvm/utils/TableGen/AsmWriterEmitter.cpp windows-clang-3.9_constify-operator.patch
- name: patch clang-8 includes
if: ${{ matrix.clang-version == 8 }}
shell: bash
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# clang-tools (clang-format, clang-query, clang-tidy) static binaries
# clang-tools static binaries

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

## Download

Grab clang-tools static binaries for your platform from [Releases](https://github.com/muttleyxd/clang-format-static-binaries/releases) tab!
Grab clang-tools static binaries for your platform from [Releases](https://github.com/cpp-linter/clang-format-static-binaries/releases) tab!

## Motivation behind this repo

Expand All @@ -19,7 +21,7 @@ These binaries aim to:

- Verify sha512sums of binaries against output from GitHub Actions to make sure binaries are not modified
- Fork this repository and run GitHub actions on your behalf
- Build manually using steps using commands from [.github/workflows](https://github.com/muttleyxd/clang-format-static-binaries/tree/master/.github/workflows)
- Build manually using steps using commands from [.github/workflows](https://github.com/cpp-linter/clang-format-static-binaries/tree/master/.github/workflows)

## More clang-tools

Expand Down
11 changes: 0 additions & 11 deletions windows-clang-3.9_constify-operator.patch

This file was deleted.

0 comments on commit fe40ca4

Please sign in to comment.