jxl-render: Improve EPF performance (#90) #188
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
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
name: Build | |
jobs: | |
build: | |
name: Compile | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-dot-cargo-${{ steps.toolchain.outputs.cacheKey }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-dot-cargo-${{ steps.toolchain.outputs.cacheKey }}- | |
${{ runner.os }}-dot-cargo- | |
- name: Detect host triple | |
id: detect-host | |
shell: bash | |
run: | | |
rustc -vV | sed -ne 's/^host: /host=/p' >> "$GITHUB_OUTPUT" | |
- run: cargo build --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: jxl-oxide-cli-${{ steps.detect-host.outputs.host }} | |
path: | | |
target/release/jxl-dec | |
target/release/jxl-dec.exe | |
target/release/jxl-info | |
target/release/jxl-info.exe | |
cross: | |
name: Cross-compile | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- armv7-unknown-linux-gnueabihf | |
- aarch64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
with: | |
targets: ${{ matrix.target }} | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cargo/.crates.toml | |
~/.cargo/.crates2.json | |
key: ${{ runner.os }}-dot-cargo-${{ steps.toolchain.outputs.cacheKey }}-cross-0.2.5-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-dot-cargo-${{ steps.toolchain.outputs.cacheKey }}-cross-0.2.5- | |
${{ runner.os }}-dot-cargo-${{ steps.toolchain.outputs.cacheKey }}-${{ hashFiles('**/Cargo.lock') }}- | |
${{ runner.os }}-dot-cargo-${{ steps.toolchain.outputs.cacheKey }}- | |
${{ runner.os }}-dot-cargo- | |
- run: cargo install cross --version 0.2.5 | |
- run: cross build --release --target ${{ matrix.target }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: jxl-oxide-cli-${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/release/jxl-dec | |
target/${{ matrix.target }}/release/jxl-info |