Skip to content

fixup! fixup! fixup! fixup! fixup! fixup! Check dependency licenses i… #106

fixup! fixup! fixup! fixup! fixup! fixup! Check dependency licenses i…

fixup! fixup! fixup! fixup! fixup! fixup! Check dependency licenses i… #106

Workflow file for this run

name: Build
on: [push]
jobs:
build:
strategy:
matrix:
mode: [ debug , release ]
os: [ ubuntu, windows ]
include:
- mode: debug
mode_flag: ""
- mode: release
mode_flag: "--release"
- os: ubuntu
exe_suffix: ""
sng: /usr/bin/sng
- os: windows
exe_suffix: .exe
sng: C:\tools\cygwin\bin\sng.exe
env:
SNG: ${{ matrix.sng }}
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.os }}-${{ matrix.mode }}
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry/
key: cargo-${{ matrix.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ matrix.os }}-
- name: Build
run: cargo build --verbose ${{ matrix.mode_flag }}
- uses: actions/upload-artifact@v4
with:
name: png_inflate-${{ matrix.os }}-${{ matrix.mode }}${{ matrix.exe_suffix }}
path: target/${{ matrix.mode }}/png_inflate${{ matrix.exe_suffix }}
#
- name: Install test dependencies (ubuntu)
if: ${{ matrix.os == 'ubuntu' }}
run: sudo apt-get -yq install sng
- name: Install test dependencies (Windows)
if: ${{ matrix.os == 'windows' }}
shell: pwsh
run: |
& choco install Cygwin
& C:\tools\cygwin\cygwinsetup.exe --no-admin -q -P sng
- name: Run tests
run: cargo test --verbose ${{matrix.mode_flag}}
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set filters
run: |
git config filter.rustfmt.clean rustfmt
git config filter.sort.clean 'LC_ALL=C sort'
- name: Apply the filters
run: 'git add --renormalize .'
- name: Check that the filters dont change the files
run: 'git diff --exit-code HEAD'
clippy_lint:
runs-on: ubuntu-latest
env:
SNG: 'arbitrary value'
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry/
key: cargo-ubuntu-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-ubuntu-
- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
check_licenses:
runs-on: ubuntu-latest
steps:
- name: Get cargo-license
run: 'cargo install cargo-license'
- uses: actions/checkout@v4
- name: Check licenses
run: >
cargo license --tsv |
awk -f .github/license-acceptable.awk