Skip to content

Commit

Permalink
Build macOS with wgpu enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Nov 28, 2023
1 parent 67cea2a commit 53e6e0c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
components: clippy
- name: Cargo check
run: cargo check
- name: Cargo clippy
Expand Down Expand Up @@ -97,15 +97,19 @@ jobs:
target: x86_64-unknown-linux-gnu
name: linux-x86_64
packages: libgtk-3-dev
features: default
- platform: windows-latest
target: x86_64-pc-windows-msvc
name: windows-x86_64
features: default
- platform: macos-latest
target: x86_64-apple-darwin
name: macos-x86_64
features: wgpu
- platform: macos-latest
target: aarch64-apple-darwin
name: macos-arm64
features: wgpu
fail-fast: false
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -121,7 +125,9 @@ jobs:
with:
targets: ${{ matrix.target }}
- name: Cargo build
run: cargo build --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }} --bin ${{ env.CARGO_BIN_NAME }}
run: |
cargo build --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }} \
--bin ${{ env.CARGO_BIN_NAME }} --features ${{ matrix.features }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,17 @@ If not specified, objdiff will use the default patterns listed above.
> `reverse_fn_order` _(optional)_: Displays function symbols in reversed order.
Used to support MWCC's `-inline deferred` option, which reverses the order of functions in the object file.

## Building

Install Rust via [rustup](https://rustup.rs).

```shell
$ git clone https://github.com/encounter/objdiff.git
$ cd objdiff
$ cargo run --release
# or, for wgpu backend (recommended on macOS)
$ cargo run --release --features wgpu
```

## License

Expand Down

0 comments on commit 53e6e0c

Please sign in to comment.