Bump jemallocator from 0.5.0 to 0.5.4 #535
Workflow file for this run
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: CI | |
on: | |
push: | |
branches-ignore: | |
- main | |
tags-ignore: | |
- '**' | |
paths: | |
- '.github/workflows/ci.yml' | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
- '**/*.rs' | |
- '**/*.sh' | |
- '**/*.exp' | |
pull_request: | |
paths: | |
- '.github/workflows/ci.yml' | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
- '**/*.rs' | |
- '**/*.sh' | |
- '**/*.exp' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.head_ref || github.ref_name }} | |
defaults: | |
run: | |
shell: bash | |
env: | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v1 | |
with: | |
sharedKey: jira_cli-check | |
cache-on-failure: true | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: false | |
- name: Update Rustup (temporary workaround) | |
run: | | |
rm /home/runner/.cargo/bin/cargo-fmt | |
rm /home/runner/.cargo/bin/rustfmt | |
rustup self update | |
rustup update --no-self-update | |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | |
cargo binstall -y cargo-quickinstall | |
- name: Audit check | |
run: | | |
cargo binstall -y cargo-audit | |
cargo audit --json > $HOME/audit.json || exit 0 | |
- name: Check a local package and all of its dependencies for errors | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all | |
- name: Lint check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all --check | |
- name: Outdated check | |
run: | | |
cargo binstall -y cargo-outdated | |
cargo outdated --depth 1 --format json > $HOME/outdated.json | |
- name: Udeps check | |
run: | | |
cargo binstall -y cargo-udeps | |
cargo +nightly udeps --quiet --workspace --all-features --all-targets --output json > $HOME/udeps.json || exit 0 | |
- name: Clippy check | |
run: | | |
rustup component add clippy | |
cargo clippy --all-features --all-targets --message-format=json -- -Dclippy::all -Dclippy::nursery -Dclippy::pedantic > $HOME/clippy.json || exit 0 | |
- name: Sonar converter | |
run: | | |
cargo binstall -y cargo-sonar | |
cargo sonar --issues audit,clippy,outdated,udeps --audit-path $HOME/audit.json --clippy-path $HOME/clippy.json --outdated-path $HOME/outdated.json --udeps-path $HOME/udeps.json --issues-path $HOME/sonar.json | |
- name: Setup sonarqube | |
uses: warchant/setup-sonar-scanner@v3 | |
- name: Run sonarqube | |
run: sonar-scanner -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.sources=$GITHUB_WORKSPACE -Dsonar.host.url=${{ secrets.SONAR_URL }} -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.externalIssuesReportPaths=$HOME/sonar.json | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
native: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- check | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: stable | |
target: x86_64-unknown-linux-gnu | |
- os: macos-latest | |
rust: stable | |
target: x86_64-apple-darwin | |
- os: windows-latest | |
rust: stable-gnu | |
target: x86_64-pc-windows-gnu | |
steps: | |
- uses: Swatinem/rust-cache@v1 | |
with: | |
sharedKey: jira_cli-${{ matrix.target }} | |
cache-on-failure: true | |
- uses: actions/checkout@v3 | |
- name: Update Rustup (temporary workaround) | |
run: rustup self update | |
shell: bash | |
if: startsWith(matrix.os, 'windows') | |
- name: Update Rustup and define default toolchain | |
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
- name: Add target | |
run: rustup target add ${{ matrix.target }} | |
- name: Install dependencies for Linux | |
run: sudo apt update -y && sudo apt install --no-install-recommends expect gcc-multilib libjemalloc-dev libsecret-1-0 libsecret-1-dev mold -y | |
if: matrix.os == 'ubuntu-latest' | |
- name: Setup mold linker | |
run: echo -e '[target.x86_64-unknown-linux-gnu]\nlinker = "/usr/bin/clang"\nrustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]' > ~/.cargo/config.toml | |
- name: Install rustfmt | |
run: rustup component add rustfmt || echo "rustfmt not available" | |
- name: Build | |
run: cargo build | |
- name: Run tests.sh | |
run: ./tests.sh | |
env: | |
JIRA_DOMAIN: ${{ secrets.JIRA_DOMAIN }} | |
JIRA_USER: ${{ secrets.JIRA_USER }} | |
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} | |
JIRA_USER_ACCOUNT_ID: ${{ secrets.JIRA_USER_ACCOUNT_ID }} | |
if: matrix.os == 'ubuntu-latest' | |
cross: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- check | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: stable | |
target: aarch64-unknown-linux-gnu | |
- os: macos-latest | |
rust: stable | |
target: aarch64-apple-darwin | |
steps: | |
- uses: Swatinem/rust-cache@v1 | |
with: | |
sharedKey: jira_cli-${{ matrix.target }} | |
cache-on-failure: true | |
- uses: actions/checkout@v3 | |
- name: Update Rustup (temporary workaround) | |
run: rustup self update | |
shell: bash | |
if: startsWith(matrix.os, 'windows') | |
- name: Update Rustup and define default toolchain | |
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
- name: Add target | |
run: rustup target add ${{ matrix.target }} | |
- name: Install dependencies for Linux | |
run: sudo apt update -y && sudo apt install --no-install-recommends expect g++-aarch64-linux-gnu gcc-aarch64-linux-gnu libjemalloc-dev libsecret-1-0 libsecret-1-dev -y | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install rustfmt | |
run: rustup component add rustfmt || echo "rustfmt not available" | |
- name: Build for all architecture except Mac ARM | |
run: cargo build --target ${{ matrix.target }} | |
if: matrix.target != 'aarch64-apple-darwin' | |
- name: Build for Mac ARM | |
run: | | |
SDKROOT=$(xcrun -sdk macosx --show-sdk-path) | |
MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version) | |
cargo build --target=aarch64-apple-darwin | |
if: matrix.target == 'aarch64-apple-darwin' | |
freebsd-x86-64: | |
name: FreeBSD x86-64 | |
runs-on: macos-12 | |
needs: | |
- check | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache target | |
id: jira_cli-freebsd-x86-64 | |
uses: actions/cache@v3 | |
with: | |
path: target/ | |
key: jira_cli-freebsd-x86-64 | |
- uses: vmactions/freebsd-vm@v0 | |
with: | |
mem: 4096 | |
usesh: true | |
prepare: | | |
mkdir -p /usr/local/etc/pkg/repos/ | |
cp /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/ | |
sed -i '' -e 's/quarterly/latest/g' /usr/local/etc/pkg/repos/FreeBSD.conf | |
pkg upgrade -y | |
pkg install -y gmake rust | |
run: | | |
cargo build --target x86_64-unknown-freebsd | |
approve-pr: | |
name: Approve PR | |
if: ${{ github.event_name == 'pull_request' }} | |
needs: | |
- check | |
- native | |
- cross | |
- freebsd-x86-64 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: hmarr/auto-approve-action@v2 | |
with: | |
github-token: ${{ secrets.PAT }} |