Skip to content

Commit

Permalink
Merge pull request #638 from wcampbell0x2a/windows-support-with-ci
Browse files Browse the repository at this point in the history
Add Windows backhand support testing
  • Loading branch information
wcampbell0x2a authored Nov 12, 2024
2 parents c961a0c + 11145b6 commit 55e3e70
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,47 @@ on:
name: ci

jobs:
# build on backhand only supported target
cross-build:
runs-on: ${{ matrix.job.os }}
env:
BUILD_CMD: cargo
strategy:
fail-fast: false
matrix:
job:
- { target: x86_64-pc-windows-gnu, os: ubuntu-latest, use-cross: true }
toolchain:
- stable
# msrv of backhand-cli
- 1.77.0
features:
- --no-default-features --features xz
- --no-default-features --features gzip
- --no-default-features --features gzip,xz
- --no-default-features --features xz-static
- --no-default-features --features gzip-zune-inflate
# default features
-

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Populate cache
uses: ./.github/workflows/cache

- name: Overwrite build command env variable
if: matrix.job.use-cross
shell: bash
run: |
echo "BUILD_CMD=cross" >> $GITHUB_ENV
RUSTFLAGS="-C target-feature=-crt-static" cargo install cross --git https://github.com/cross-rs/cross
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
# build lib with cross
- run: $BUILD_CMD build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --lib

# build/test all supported targets for library and bins (skipping slow and squashfs-tools tests)
cross-test:
runs-on: ${{ matrix.job.os }}
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove duplicated data when addding new files to a `FilesystemWriter`. This also applies this behavior to the `add` and `replace` binaries. This is controllable with `FilesystemWriter::set_no_duplicate_files`. ([#603](https://github.com/wcampbell0x2a/backhand/pull/603)), ([#594](https://github.com/wcampbell0x2a/backhand/pull/594))
- Increase speed of internal `HashMap`s, by switching to `xxhash` and just using the `inode` as the key in other places.
- Changed `SuperBlock::Flags` to be public.

- Add non-standard CompressionOptions support ([#584](https://github.com/wcampbell0x2a/backhand/pull/584))
- Add `CompressionAction::compression_options` to override the default compression options emitted during writing.
- Add `FilesystemWriter::set_emit_compression_options`
- Support sparse file extraction ([#624](https://github.com/wcampbell0x2a/backhand/pull/624))
- Add `x86_64-pc-windows-gnu` support ([@Wolfyxon](https://github.com/Wolfyxon)) ([#634](https://github.com/wcampbell0x2a/backhand/pull/634))

### `backhand-cli`
- Add `--no-compression-options` to `add` and `replace` to remove compression options from image after modification.
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ Add the following to your `Cargo.toml` file:
[dependencies]
backhand = "0.18.0"
```

#### Target Support
Although additional targets may be supported, only the following have been fully tested or confirmed to build successfully.

| Target | `build` | `test` |
|----------------------------------------|--------:|:------:|
| `x86_64-unknown-linux-musl` |||
| `aarch64-unknown-linux-musl` |||
| `arm-unknown-linux-musleabi` |||
| `armv7-unknown-linux-musleabi` |||
| `aarch64-unknown-linux-musl` |||
| `x86_64-apple-darwin` |||
| `x86_64-pc-windows-gnu` || |

### Reading/Writing/Modifying Firmware
```rust,no_run
use std::fs::File;
Expand Down Expand Up @@ -68,6 +82,18 @@ To install, run `cargo install backhand-cli --locked`, or download from the

See ``--help`` for more information.

#### Target Support
Although additional targets may be supported, only the following have been tested and included in our GitHub releases.

| Target | `test` | `release` |
|----------------------------------------|----------:|:---------:|
| `x86_64-unknown-linux-musl` |||
| `aarch64-unknown-linux-musl` |||
| `arm-unknown-linux-musleabi` |||
| `armv7-unknown-linux-musleabi` |||
| `aarch64-unknown-linux-musl` |||
| `x86_64-apple-darwin` |||

### unsquashfs-backhand
```no_test
tool to uncompress, extract and list squashfs filesystems
Expand Down

0 comments on commit 55e3e70

Please sign in to comment.