Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,26 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
seed-build-script:
runs-on: ubuntu-latest
name: Pre-seed static binaries' versions
steps:
- env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release download
-R cpp-linter/clang-tools-static-binaries
--pattern versions.json
--output versions.json
- name: Upload versions.json
uses: actions/upload-artifact@v7
with:
name: static-binary-versions
path: versions.json
if-no-files-found: error

build-bin:
needs: [seed-build-script]
name: Build ${{ matrix.name }} binary
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -60,6 +79,12 @@ jobs:
fi
- run: rustup update --no-self-update
if: steps.cache.outputs.cache-hit != 'true' || steps.validate.outputs.cache-valid == 'false'
- name: Restore build script seed
if: steps.cache.outputs.cache-hit != 'true' || steps.validate.outputs.cache-valid == 'false'
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- run: cargo build --bin cpp-linter --features bin --release
if: steps.cache.outputs.cache-hit != 'true' || steps.validate.outputs.cache-valid == 'false'
- name: Upload build artifact
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/binary-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,26 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
seed-build-script:
runs-on: ubuntu-latest
name: Pre-seed static binaries' versions
steps:
- env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release download
-R cpp-linter/clang-tools-static-binaries
--pattern versions.json
--output versions.json
- name: Upload versions.json
uses: actions/upload-artifact@v7
with:
name: static-binary-versions
path: versions.json
if-no-files-found: error

create-assets:
needs: [seed-build-script]
name: ${{ matrix.target }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -113,6 +132,12 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
run: cargo binstall -y cross

- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer

- name: Build
run: >-
${{ matrix.cross && 'cross' || 'cargo '}}
Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,27 @@ jobs:
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch

seed-build-script:
runs-on: ubuntu-latest
name: Pre-seed static binaries' versions
steps:
- env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release download
-R cpp-linter/clang-tools-static-binaries
--pattern versions.json
--output versions.json
- name: Upload versions.json
uses: actions/upload-artifact@v7
with:
name: static-binary-versions
path: versions.json
if-no-files-found: error

build-mkdocs:
runs-on: ubuntu-latest
needs: [cache-deps]
needs: [cache-deps, seed-build-script]
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -66,6 +84,11 @@ jobs:
run: cargo binstall -y nur
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- name: Build docs
run: nur docs --build
- name: Upload docs build as artifact
Expand All @@ -76,7 +99,7 @@ jobs:

build-rustdoc:
runs-on: ubuntu-latest
needs: [cache-deps]
needs: [cache-deps, seed-build-script]
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -97,6 +120,11 @@ jobs:
run: cargo binstall -y nur
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- run: nur docs rs
- name: upload rustdoc build as artifact
uses: actions/upload-artifact@v7
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bump-n-release.nu
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export def bump-version [
run-cmd 'yarn' 'version' ($result | get 'new')
print 'Updated version in bindings/node/package.json'
cd '../..'
print "Regenerating index.js"
run-cmd yarn build:debug
}
$result | get new
}
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/node-js-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,26 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
seed-build-script:
runs-on: ubuntu-latest
name: Pre-seed static binaries' versions
steps:
- env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release download
-R cpp-linter/clang-tools-static-binaries
--pattern versions.json
--output versions.json
- name: Upload versions.json
uses: actions/upload-artifact@v7
with:
name: static-binary-versions
path: versions.json
if-no-files-found: error

build:
needs: [seed-build-script]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -121,6 +140,11 @@ jobs:
shell: bash
- name: Install dependencies
run: yarn install
- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- name: Build
run: ${{ matrix.settings.build }}
shell: bash
Expand All @@ -133,6 +157,7 @@ jobs:
bindings/node/${{ env.APP_NAME }}.*.wasm
if-no-files-found: error
build-freebsd:
needs: [seed-build-script]
runs-on: ubuntu-latest
name: Build FreeBSD
steps:
Expand All @@ -150,6 +175,11 @@ jobs:
memory: 8G
cpu_count: 3
environment_variables: DEBUG RUSTUP_IO_THREADS
- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- name: Build
shell: cpa.sh {0}
run: |-
Expand Down
83 changes: 58 additions & 25 deletions .github/workflows/python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,29 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
seed-build-script:
runs-on: ubuntu-latest
name: Pre-seed static binaries' versions
steps:
- env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release download
-R cpp-linter/clang-tools-static-binaries
--pattern versions.json
--output versions.json
- name: Upload versions.json
uses: actions/upload-artifact@v7
with:
name: static-binary-versions
path: versions.json
if-no-files-found: error

linux:
needs: [seed-build-script]
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-latest
Expand All @@ -56,54 +76,56 @@ jobs:
target: aarch64
- runner: ubuntu-latest
target: armv7
- runner: ubuntu-latest
target: s390x
- runner: ubuntu-latest
target: ppc64le
# These targets currently fail because the docker containers used for building manylinux wheels
# use a known-bad C compiler version; aws-lc-sys refuses to build with the bad compiler:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
# - runner: ubuntu-latest
# target: s390x
# - runner: ubuntu-latest
# target: ppc64le
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: '3.x'

- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
target: ${{ matrix.platform.target }}
# Use the zig toolchain for all targets except ppc64le.
# Note, this is meant to avoid build errors in aws-lc-sys crate, which compiles C code.
args: >-
--release --out dist --find-interpreter
${{ matrix.platform.target != 'ppc64le' && '--zig' || ''}}
--release --out dist --find-interpreter --zig
# avoid cache-poisoning potential for actually distributed builds
sccache: ${{ startsWith(github.ref, 'refs/tags') && 'false' || 'true' }}
manylinux: auto
# here we either install the ppc64le compiler/toolchain or install zig on all others
before-script-linux: |
case "${{ matrix.platform.target }}" in
ppc64le)
apt-get update
apt-get install -y \
pkg-config \
gcc-powerpc64le-linux-gnu \
g++-powerpc64le-linux-gnu \
binutils-powerpc64le-linux-gnu \
libc6-dev-ppc64el-cross
;;
*)
# spell-checker: disable-next-line
pip install ziglang
;;
esac
manylinux: 'auto'
# before-script-linux: |
# case "${{ matrix.platform.target }}" in
# ppc64le)
# apt-get update
# apt-get install -y \
# pkg-config \
# gcc-powerpc64le-linux-gnu \
# g++-powerpc64le-linux-gnu \
# binutils-powerpc64le-linux-gnu \
# libc6-dev-ppc64el-cross
# ;;
# esac
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist/*

windows:
needs: [seed-build-script]
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
Expand All @@ -120,6 +142,11 @@ jobs:
with:
python-version: '3.x'
architecture: ${{ matrix.platform.target }}
- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
Expand All @@ -133,6 +160,7 @@ jobs:
path: dist/*

macos:
needs: [seed-build-script]
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
Expand All @@ -149,6 +177,11 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Restore build script seed
uses: actions/download-artifact@v8
with:
name: static-binary-versions
path: clang-installer
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
Expand Down
Loading
Loading