Publish crate bindgen-cli 0.69.4 from #1461 #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bindgen-cli stable build | |
on: | |
push: | |
branches: [ trigger/stable ] | |
workflow_dispatch: | |
env: | |
index: https://github.com/cargo-prebuilt/index/releases/download/stable-index/ | |
crate: bindgen-cli | |
version: 0.69.4 | |
dl: https://static.crates.io/crates/bindgen-cli/bindgen-cli-0.69.4.crate | |
checksum: 5d31479f44d2c9eed368e5f945cb4846d2c8313bd91feb16b6ae937a80b7ae01 | |
git: https://github.com/rust-lang/rust-bindgen | |
bins: bindgen | |
file: ./crates/bindgen-cli.toml | |
CARGO_TERM_COLOR: always | |
python-version: "3.12" | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: | | |
build | |
key: ${{ env.crate }}-${{ env.version }}-stable-crate | |
enableCrossOsArchive: true | |
- name: Create Folder | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
run: mkdir -p ./build | |
- name: Download crate and check hash | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
run: | | |
wget ${{ env.dl }} | |
echo "${{ env.checksum }} ${{ env.crate }}-${{ env.version }}.crate" | sha256sum -c | |
tar -xf ${{ env.crate }}-${{ env.version }}.crate | |
mv ${{ env.crate }}-${{ env.version }}/* ./build | |
- name: Update Rust | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
run: | | |
rustup update | |
rustc --version | |
- name: Generated lockfile if needed | |
if: ${{ !steps.cache.outputs.cache-hit }} | |
working-directory: ./build | |
run: test -f Cargo.lock || cargo +stable generate-lockfile --verbose | |
t1-aarch64-apple-darwin: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ x86_64-apple-darwin, aarch64-apple-darwin ] | |
runs-on: macos-14 | |
needs: [ setup ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python-version }} | |
- name: Get crate from cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
build | |
key: ${{ env.crate }}-${{ env.version }}-stable-crate | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- uses: Swatinem/rust-cache@v2 | |
if: ${{ !false }} | |
with: | |
workspaces: "./build -> target" | |
prefix-key: "v0-rust-${{ matrix.target }}-${{ env.crate }}-${{ env.version }}" | |
- name: Update Rust and Add Target | |
run: | | |
rustup update | |
rustc --version | |
rustup target add ${{ matrix.target }} | |
- uses: cargo-prebuilt/cargo-prebuilt-action@v3 | |
with: | |
pkgs: cargo-auditable | |
- name: Build crate | |
working-directory: ./build | |
run: cargo +stable auditable build --verbose --release --locked --target ${{ matrix.target }} | |
- name: Collect | |
run: python ./scripts/collect.py ${{ matrix.target }} ./build/target/${{ matrix.target }}/release ${{ env.bins }} | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ matrix.target }}-macos14 | |
path: | | |
${{ matrix.target }}.tar.gz | |
${{ matrix.target }}.hashes.json | |
t1-apple-darwin: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ x86_64-apple-darwin, aarch64-apple-darwin ] | |
runs-on: macos-latest | |
needs: [ setup ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python-version }} | |
- name: Get crate from cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
build | |
key: ${{ env.crate }}-${{ env.version }}-stable-crate | |
enableCrossOsArchive: true | |
fail-on-cache-miss: true | |
- uses: Swatinem/rust-cache@v2 | |
if: ${{ !false }} | |
with: | |
workspaces: "./build -> target" | |
prefix-key: "v0-rust-${{ matrix.target }}-${{ env.crate }}-${{ env.version }}" | |
- name: Update Rust and Add Target | |
run: | | |
rustup update | |
rustc --version | |
rustup target add ${{ matrix.target }} | |
- uses: cargo-prebuilt/cargo-prebuilt-action@v3 | |
with: | |
pkgs: cargo-auditable | |
- name: Build crate | |
working-directory: ./build | |
run: cargo +stable auditable build --verbose --release --locked --target ${{ matrix.target }} | |
- name: Collect | |
run: python ./scripts/collect.py ${{ matrix.target }} ./build/target/${{ matrix.target }}/release ${{ env.bins }} | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ matrix.target }} | |
path: | | |
${{ matrix.target }}.tar.gz | |
${{ matrix.target }}.hashes.json |