Skip to content

Commit d1e2136

Browse files
authored
refactor: migrate to git-bot-feedback lib (#304)
resolves #97 This has 2 main benefits: 1. Improved PR review support. The [git-bot-feedback] lib automatically hides outdated suggestions and reviews. 2. Any further CI platform support can get implemented in the [git-bot-feedback] lib. This way, cpp-linter gets the newly supported CI platforms for "free." During review, I found a way to remove dependence on OpenSSL in both libgit2 and reqwest libraries. We are now using rustls as our TLS backend for HTTP requests. [git-bot-feedback]: https://github.com/2bndy5/git-bot-feedback
1 parent d4f276c commit d1e2136

50 files changed

Lines changed: 1651 additions & 8929 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/nextest.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ status-level = "skip"
2020
# Run this profile before other tests to warmup the cache of clang tools binaries.
2121
default-filter = 'test(#*eval_version)'
2222

23+
# only show the job(s) being run in this profile
24+
status-level = "pass"
25+
2326
[profile.ci]
2427
# A profile to run only tests that use clang-tidy and/or clang-format
2528
# NOTE: This profile is intended to keep CI runtime low. Locally, use default or all profiles
2629

27-
# This is all tests in tests/ folder + unit test for --extra-args.
28-
default-filter = "kind(test) + test(#*use_extra_args) + test(#*eval_version)"
30+
default-filter = "(kind(test) + test(use_extra_args)) - package(clang-installer)"
2931

30-
# show log output from each test
31-
success-output = "final"
32-
failure-output = "immediate-final"
32+
# show log output from each failing test
33+
failure-output = "final"
3334

3435
[profile.all]
3536
# A profile to run all tests (including tests that run longer than 10 seconds)

.github/install-clang-action/README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/install-clang-action/action.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/binary-builds.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,63 +42,48 @@ jobs:
4242
include:
4343
- target: aarch64-unknown-linux-gnu
4444
os: ubuntu-latest
45-
vendored: true
4645
cross: true
4746
- target: aarch64-unknown-linux-musl
4847
os: ubuntu-latest
49-
vendored: true
5048
cross: true
5149
- target: x86_64-unknown-linux-gnu
5250
os: ubuntu-latest
53-
vendored: false
5451
cross: false
5552
- target: x86_64-unknown-linux-musl
5653
os: ubuntu-latest
57-
vendored: true
5854
cross: true
5955
- target: arm-unknown-linux-gnueabi
6056
os: ubuntu-latest
61-
vendored: true
6257
cross: true
6358
- target: arm-unknown-linux-gnueabihf
6459
os: ubuntu-latest
65-
vendored: true
6660
cross: true
6761
- target: armv7-unknown-linux-gnueabihf
6862
os: ubuntu-latest
69-
vendored: true
7063
cross: true
7164
- target: powerpc-unknown-linux-gnu
7265
os: ubuntu-latest
73-
vendored: true
7466
cross: true
75-
# - target: powerpc64-unknown-linux-gnu
76-
# os: ubuntu-latest
77-
# vendored: true
78-
# cross: true
67+
- target: powerpc64-unknown-linux-gnu
68+
os: ubuntu-latest
69+
cross: true
7970
- target: powerpc64le-unknown-linux-gnu
8071
os: ubuntu-latest
81-
vendored: true
8272
cross: true
8373
- target: s390x-unknown-linux-gnu
8474
os: ubuntu-latest
85-
vendored: true
8675
cross: true
8776
- target: aarch64-apple-darwin
8877
os: macos-latest
89-
vendored: true
9078
cross: false
9179
- target: x86_64-apple-darwin
9280
os: macos-latest
93-
vendored: true
9481
cross: false
9582
- target: x86_64-pc-windows-msvc
9683
os: windows-latest
97-
vendored: false
9884
cross: false
9985
- target: aarch64-pc-windows-msvc
10086
os: windows-latest
101-
vendored: false
10287
cross: false
10388
runs-on: ${{ matrix.os }}
10489
permissions:
@@ -136,7 +121,7 @@ jobs:
136121
--bin clang-tools
137122
--release
138123
--target ${{ matrix.target }}
139-
--features ${{ matrix.vendored && 'bin,openssl-vendored' || 'bin' }}
124+
--features bin
140125
141126
- name: Prepare artifacts (unix)
142127
if: runner.os != 'Windows'

.github/workflows/node-js-packaging.yml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
settings:
4646
- host: macos-latest
4747
target: x86_64-apple-darwin
48-
build: yarn build --target x86_64-apple-darwin --features openssl-vendored
48+
build: yarn build --target x86_64-apple-darwin
4949
- host: windows-latest
5050
build: yarn build --target x86_64-pc-windows-msvc
5151
target: x86_64-pc-windows-msvc
@@ -54,22 +54,22 @@ jobs:
5454
target: i686-pc-windows-msvc
5555
- host: ubuntu-latest
5656
target: x86_64-unknown-linux-gnu
57-
build: yarn build --target x86_64-unknown-linux-gnu --use-cross --features openssl-vendored
57+
build: yarn build --target x86_64-unknown-linux-gnu --use-cross
5858
- host: ubuntu-latest
5959
target: x86_64-unknown-linux-musl
60-
build: yarn build --target x86_64-unknown-linux-musl -x --features openssl-vendored
60+
build: yarn build --target x86_64-unknown-linux-musl -x
6161
- host: macos-latest
6262
target: aarch64-apple-darwin
63-
build: yarn build --target aarch64-apple-darwin --features openssl-vendored
63+
build: yarn build --target aarch64-apple-darwin
6464
- host: ubuntu-latest
6565
target: aarch64-unknown-linux-gnu
66-
build: yarn build --target aarch64-unknown-linux-gnu --use-cross --features openssl-vendored
66+
build: yarn build --target aarch64-unknown-linux-gnu --use-cross
6767
- host: ubuntu-latest
6868
target: armv7-unknown-linux-gnueabihf
69-
build: yarn build --target armv7-unknown-linux-gnueabihf --use-cross --features openssl-vendored
69+
build: yarn build --target armv7-unknown-linux-gnueabihf --use-cross
7070
- host: ubuntu-latest
7171
target: aarch64-unknown-linux-musl
72-
build: yarn build --target aarch64-unknown-linux-musl -x --features openssl-vendored
72+
build: yarn build --target aarch64-unknown-linux-musl -x
7373
- host: windows-latest
7474
target: aarch64-pc-windows-msvc
7575
build: yarn build --target aarch64-pc-windows-msvc
@@ -100,20 +100,20 @@ jobs:
100100
target/
101101
key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }}
102102
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
103-
if: ${{ contains(matrix.settings.build, ' -x ') }}
103+
if: ${{ endsWith(matrix.settings.build, ' -x') }}
104104
with:
105105
version: 0.14.1
106106
use-cache: true # zizmor: ignore[cache-poisoning]
107107
- name: Install cargo-binstall
108-
if: contains(matrix.settings.build, ' -x ') || contains(matrix.settings.build, '--use-cross ')
108+
if: endsWith(matrix.settings.build, ' -x') || endsWith(matrix.settings.build, '--use-cross')
109109
uses: cargo-bins/cargo-binstall@aaa84a43aec4955a42c5ffc65d258961e39f276e # v1.19.1
110110
env:
111111
GITHUB_TOKEN: ${{ github.token }}
112-
- name: Install ${{contains(matrix.settings.build, ' -x ') && 'cargo-zigbuild' || 'cargo-cross'}}
113-
if: contains(matrix.settings.build, ' -x ') || contains(matrix.settings.build, '--use-cross ')
112+
- name: Install ${{endsWith(matrix.settings.build, ' -x') && 'cargo-zigbuild' || 'cargo-cross'}}
113+
if: endsWith(matrix.settings.build, ' -x') || endsWith(matrix.settings.build, '--use-cross')
114114
env:
115115
GITHUB_TOKEN: ${{ github.token }}
116-
tool: ${{contains(matrix.settings.build, ' -x ') && 'cargo-zigbuild' || 'cross'}}
116+
tool: ${{endsWith(matrix.settings.build, ' -x') && 'cargo-zigbuild' || 'cross'}}
117117
run: cargo binstall -y $tool
118118
- name: Setup toolchain
119119
run: ${{ matrix.settings.setup }}
@@ -139,8 +139,7 @@ jobs:
139139
- uses: actions/checkout@v6
140140
with:
141141
persist-credentials: false
142-
- name: Build
143-
id: build
142+
- name: setup FreeBSD VM
144143
uses: cross-platform-actions/action@0c165ad7eb2d6a7e8552d6af5aad2bbedfc646b0 # v1.1.0
145144
env:
146145
DEBUG: napi:*
@@ -151,29 +150,30 @@ jobs:
151150
memory: 8G
152151
cpu_count: 3
153152
environment_variables: DEBUG RUSTUP_IO_THREADS
154-
shell: bash
155-
run: |
156-
sudo pkg install -y -f curl node libnghttp2 npm cmake
157-
sudo npm install -g yarn --ignore-scripts
158-
curl https://sh.rustup.rs -sSf --output rustup.sh
159-
sh rustup.sh -y --profile minimal --default-toolchain stable
160-
source "$HOME/.cargo/env"
161-
echo "~~~~ rustc --version ~~~~"
162-
rustc --version
163-
echo "~~~~ node -v ~~~~"
164-
node -v
165-
echo "~~~~ yarn --version ~~~~"
166-
yarn --version
167-
pwd
168-
ls -lah
169-
whoami
170-
env
171-
freebsd-version
172-
yarn install
173-
yarn build
174-
rm -rf node_modules
175-
rm -rf target
176-
rm -rf .yarn/cache
153+
- name: Build
154+
shell: cpa.sh {0}
155+
run: |-
156+
sudo pkg install -y -f curl node libnghttp2 npm cmake
157+
sudo npm install -g yarn --ignore-scripts
158+
curl https://sh.rustup.rs -sSf --output rustup.sh
159+
sh rustup.sh -y --profile minimal --default-toolchain stable
160+
. "$HOME/.cargo/env"
161+
echo "~~~~ rustc --version ~~~~"
162+
rustc --version
163+
echo "~~~~ node -v ~~~~"
164+
node -v
165+
echo "~~~~ yarn --version ~~~~"
166+
yarn --version
167+
pwd
168+
ls -lah
169+
whoami
170+
env
171+
freebsd-version
172+
yarn install
173+
yarn build
174+
rm -rf node_modules
175+
rm -rf target
176+
rm -rf .yarn/cache
177177
- name: Upload artifact
178178
uses: actions/upload-artifact@v7
179179
with:

.github/workflows/python-packaging.yml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
#
66
# NOTE: There are some customizations added to the generated output.
77
# - workflow name is more descriptive
8-
# - use openssl-vendored cargo feature on
9-
# * most cross-compiled Linux wheels
10-
# * all MacOS builds
11-
# - musl linux builds (& x390 Linux target) are excluded due to complexity of
12-
# installing openSSL lib in cross-compiler's docker/env.
8+
# - use zig compiler on most cross-compiled Linux wheels
139
name: Python builds
1410

1511
on:
@@ -60,8 +56,8 @@ jobs:
6056
target: aarch64
6157
- runner: ubuntu-latest
6258
target: armv7
63-
# - runner: ubuntu-latest
64-
# target: s390x
59+
- runner: ubuntu-latest
60+
target: s390x
6561
- runner: ubuntu-latest
6662
target: ppc64le
6763
steps:
@@ -72,34 +68,33 @@ jobs:
7268
with:
7369
python-version: '3.x'
7470

75-
- name: Calculate openssl-vendored
76-
shell: bash
77-
id: is-openssl-vendored
78-
run: |
79-
if [[ "${{ startsWith(matrix.platform.target, 'x86') }}" == "true" ]]; then
80-
echo "enabled=" >> $GITHUB_OUTPUT
81-
else
82-
echo "enabled=--features openssl-vendored" >> $GITHUB_OUTPUT
83-
fi
84-
8571
- name: Build wheels
8672
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
8773
with:
8874
target: ${{ matrix.platform.target }}
89-
args: --release --out dist --find-interpreter ${{ steps.is-openssl-vendored.outputs.enabled }}
90-
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
75+
# Use the zig toolchain for all targets except ppc64le.
76+
# Note, this is meant to avoid build errors in aws-lc-sys crate, which compiles C code.
77+
args: >-
78+
--release --out dist --find-interpreter
79+
${{ matrix.platform.target != 'ppc64le' && '--zig' || ''}}
80+
# avoid cache-poisoning potential for actually distributed builds
81+
sccache: ${{ startsWith(github.ref, 'refs/tags') && 'false' || 'true' }}
9182
manylinux: auto
83+
# here we either install the ppc64le compiler/toolchain or install zig on all others
9284
before-script-linux: |
9385
case "${{ matrix.platform.target }}" in
94-
"aarch64" | "armv7" | "s390x" | "ppc64le")
95-
# NOTE: pypa/manylinux docker images are Debian based
96-
sudo apt-get update
97-
sudo apt-get install -y pkg-config libssl-dev
86+
ppc64le)
87+
apt-get update
88+
apt-get install -y \
89+
pkg-config \
90+
gcc-powerpc64le-linux-gnu \
91+
g++-powerpc64le-linux-gnu \
92+
binutils-powerpc64le-linux-gnu \
93+
libc6-dev-ppc64el-cross
9894
;;
99-
"x86" | "x86_64")
100-
# NOTE: rust-cross/manylinux docker images are CentOS based
101-
yum update -y
102-
yum install -y openssl openssl-devel
95+
*)
96+
# spell-checker: disable-next-line
97+
pip install ziglang
10398
;;
10499
esac
105100
- name: Upload wheels
@@ -158,7 +153,7 @@ jobs:
158153
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
159154
with:
160155
target: ${{ matrix.platform.target }}
161-
args: --release --out dist --find-interpreter --features openssl-vendored
156+
args: --release --out dist --find-interpreter
162157
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
163158
- name: Upload wheels
164159
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)