Skip to content

build(deps): bump webpki from 0.22.0 to 0.22.2 #81

build(deps): bump webpki from 0.22.0 to 0.22.2

build(deps): bump webpki from 0.22.0 to 0.22.2 #81

Workflow file for this run

name: CICD
on:
pull_request:
branches:
- '*'
push:
branches:
- main
jobs:
version:
name: "🧮 Compute the version"
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_next_version.outputs.version }}
hasNextVersion: ${{ steps.get_next_version.outputs.hasNextVersion }}
steps:
- uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get next version
id: get_next_version
uses: thenativeweb/get-next-version@main
- name: print
run: |
echo "version: ${{ steps.get_next_version.outputs.version }}"
echo "has_next_version: ${{ steps.get_next_version.outputs.hasNextVersion }}"
check:
name: "🔍 checks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust Toolchain Components
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: check
run: cargo check
lints:
name: "💅 lints"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust Toolchain Components
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all --all-targets -- -D warnings
- name: Format
run: cargo fmt --all -- --check
tests:
name: "⚙️ Run unit-tests"
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: Install Rust Toolchain Components
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --all
- name: Show help
run: cargo run -- -h
changelog:
if: needs.version.outputs.hasNextVersion == 'true'
needs:
- version
name: ✍️ Generate changelog
runs-on: ubuntu-latest
outputs:
content: ${{steps.git-cliff.outputs.content}}
release_body: ${{ steps.git-cliff-changes.outputs.content }}
steps:
- uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- run: git tag "v${{needs.version.outputs.version}}"
- name: Generate a changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Print the changelog
run: echo "${{ steps.git-cliff.outputs.content }}"
- name: Generate a changelog
uses: orhun/git-cliff-action@v2
id: git-cliff-changes
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: CHANGES.md
- name: Print the changelog
run: echo "${{ steps.git-cliff-changes.outputs.content }}"
build:
name: "🛠️ Build binaries"
if: needs.version.outputs.hasNextVersion == 'true'
defaults:
run:
shell: bash
needs:
- version
- tests
- lints
- check
strategy:
fail-fast: false
matrix:
job:
- { target: x86_64-apple-darwin , suffix: "" , os: macos-latest }
- { target: aarch64-apple-darwin , suffix: "" , os: macos-latest }
- { target: x86_64-unknown-linux-gnu , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: x86_64-unknown-linux-musl , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: aarch64-unknown-linux-gnu , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: aarch64-unknown-linux-musl , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: arm-unknown-linux-gnueabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: arm-unknown-linux-gnueabihf , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: arm-unknown-linux-musleabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: arm-unknown-linux-musleabihf , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv7-unknown-linux-gnueabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv7-unknown-linux-gnueabihf , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv7-unknown-linux-musleabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv7-unknown-linux-musleabihf , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: i586-unknown-linux-gnu , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: i686-unknown-linux-gnu , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: x86_64-unknown-netbsd , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: x86_64-unknown-freebsd , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv5te-unknown-linux-gnueabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv5te-unknown-linux-musleabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: arm-linux-androideabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: armv7-linux-androideabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: aarch64-linux-android , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: i686-linux-android , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: x86_64-linux-android , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: thumbv7neon-linux-androideabi , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: thumbv7neon-unknown-linux-gnueabihf , suffix: "" , os: ubuntu-latest, use-cross: true }
- { target: x86_64-pc-windows-msvc , suffix: "" , os: windows-latest }
- { target: aarch64-pc-windows-msvc , suffix: "" , os: windows-latest }
- { target: i686-pc-windows-msvc , suffix: "" , os: windows-latest }
- { target: x86_64-pc-windows-gnu , suffix: "" , os: windows-latest }
runs-on: ${{matrix.job.os}}
steps:
- uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: "Get Repository name"
id: get_repository_name
run: |
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_OUTPUT
shell: bash
- name: Install Rust Toolchain Components
uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.job.target }}
toolchain: stable
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-release
- name: "Bump version into cargo.toml"
run: cargo-release release version ${{ needs.version.outputs.version }}
- name: Build
if: ${{ matrix.job.use-cross != true }}
run: | # https://github.com/rust-lang/rustup/issues/2612#issuecomment-1433876793
if [[ ${{ matrix.job.target }} == "aarch64-pc-windows-msvc" ]]; then
echo "ring override for aarch64-pc-windows-msvc"
echo [patch.crates-io] >> cargo.toml
echo ring = { git = \"https://github.com/awakecoding/ring\", branch = \"0.16.20_alpha\" } >> cargo.toml
cargo update
fi
cargo build --bin pact-graph-network${{ matrix.job.suffix }} --release --target=${{ matrix.job.target }}
- name: Build
if: ${{ matrix.job.use-cross == true }}
run: | # Install latest cross for android targets
cargo install cross --git https://github.com/cross-rs/cross
cross build --bin pact-graph-network${{ matrix.job.suffix }} --release --target=${{ matrix.job.target }}
- name: Create dist
id: dist
shell: bash
run: |
EXECUTABLE="target/${{ matrix.job.target }}/release/pact-graph-network${{ matrix.job.suffix }}"
BINARY_NAME="pact-graph-network_${{ matrix.job.target }}${{ matrix.job.suffix }}"
BINARY_PATH="dist/${BINARY_NAME}"
mkdir -p "dist/"
# Binary
cp "${EXECUTABLE}" "${BINARY_PATH}"
echo "BINARY_NAME=${BINARY_NAME}" >> $GITHUB_OUTPUT
echo "BINARY_PATH=${BINARY_PATH}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-${{ matrix.job.target }}
path: dist/
release:
name: "📦 Github release"
if: |
github.ref == 'refs/heads/main' &&
needs.version.outputs.hasNextVersion == 'true'
needs:
- version
- changelog
- build
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
steps:
- uses: actions/checkout@v3
- id: get_repository_name
run: |
REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-apple-darwin
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-aarch64-apple-darwin
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-linux-gnu
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-linux-musl
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-aarch64-unknown-linux-gnu
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-aarch64-unknown-linux-musl
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-arm-unknown-linux-gnueabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-arm-unknown-linux-gnueabihf
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-arm-unknown-linux-musleabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-arm-unknown-linux-musleabihf
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv7-unknown-linux-gnueabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv7-unknown-linux-gnueabihf
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv7-unknown-linux-musleabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv7-unknown-linux-musleabihf
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-i586-unknown-linux-gnu
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-i686-unknown-linux-gnu
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-netbsd
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-freebsd
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv5te-unknown-linux-gnueabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv5te-unknown-linux-musleabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-arm-linux-androideabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-armv7-linux-androideabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-aarch64-linux-android
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-i686-linux-android
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-linux-android
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-thumbv7neon-linux-androideabi
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-thumbv7neon-unknown-linux-gnueabihf
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-pc-windows-msvc
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-aarch64-pc-windows-msvc
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-i686-pc-windows-msvc
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-pc-windows-gnu
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-release
- name: "Bump version into cargo.toml"
run: cargo-release release version ${{ needs.version.outputs.version }}
- name: check
run: cargo check
- name: "Write changelog"
run: echo "${{ needs.changelog.outputs.content }}" > CHANGELOG.md
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(release): prepare for v${{ needs.version.outputs.version }}"
branch: ${{ github.head_ref }}
file_pattern: 'Cargo.* CHANGELOG.md'
- name: Publish archives and packages
uses: softprops/action-gh-release@master
with:
tag_name: 'v${{ needs.version.outputs.version }}'
name: 'Release v${{ needs.version.outputs.version }}'
generate_release_notes: false
body: "${{ needs.changelog.outputs.release_body }}"
files: |
pact-graph-network*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}