From 56a5a61825373002b8d2fd84f76c27f304eb1574 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 9 Sep 2024 19:34:50 -0600 Subject: [PATCH] Updates to CI workflow & README.md --- .github/workflows/build.yaml | 58 ++++++++++++++---------------------- Cargo.toml | 3 +- README.md | 27 ++++++++++++++--- 3 files changed, 47 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a3221b3..d3e565d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,6 +11,7 @@ on: env: BUILD_PROFILE: release-lto CARGO_TARGET_DIR: target + CARGO_INCREMENTAL: 0 jobs: check: @@ -25,35 +26,14 @@ jobs: sudo apt-get -y install libgtk-3-dev - name: Checkout uses: actions/checkout@v4 - - name: Check git tag against Cargo version - if: startsWith(github.ref, 'refs/tags/') - shell: bash - run: | - set -eou pipefail - tag='${{github.ref}}' - tag="${tag#refs/tags/}" - version=$(grep '^version' Cargo.toml | head -1 | awk -F' = ' '{print $2}' | tr -d '"') - version="v$version" - if [ "$tag" != "$version" ]; then - echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)" - exit 1 - fi - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable with: components: clippy - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.4 - name: Cargo check - env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: "true" - run: cargo check + run: cargo check --all-features --all-targets - name: Cargo clippy - env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: "true" - run: cargo clippy + run: cargo clippy --all-features --all-targets fmt: name: Format @@ -105,13 +85,8 @@ jobs: uses: actions/checkout@v4 - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.4 - name: Cargo test - env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: "true" - run: cargo test --release + run: cargo test --release --all-features build-cli: name: Build objdiff-cli @@ -228,12 +203,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.4 - name: Cargo build - env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: "true" run: > cargo build --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }} --bin ${{ env.CARGO_BIN_NAME }} --features ${{ matrix.features }} @@ -250,10 +220,24 @@ jobs: name: Release if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest - needs: [ check, build-cli, build-gui ] + needs: [ build-cli, build-gui ] permissions: contents: write steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check git tag against Cargo version + shell: bash + run: | + set -eou pipefail + tag='${{github.ref}}' + tag="${tag#refs/tags/}" + version=$(grep '^version' Cargo.toml | head -1 | awk -F' = ' '{print $2}' | tr -d '"') + version="v$version" + if [ "$tag" != "$version" ]; then + echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)" + exit 1 + fi - name: Download artifacts uses: actions/download-artifact@v4 with: @@ -281,6 +265,8 @@ jobs: done ls -R ../out - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: files: out/* + draft: true + generate_release_notes: true diff --git a/Cargo.toml b/Cargo.toml index 54f1ed6..b57afd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,9 @@ resolver = "2" [profile.release-lto] inherits = "release" -lto = "thin" +lto = "fat" strip = "debuginfo" +codegen-units = 1 [workspace.package] version = "2.0.0-beta.7" diff --git a/README.md b/README.md index 46604fc..650c43c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ A local diffing tool for decompilation projects. Inspired by [decomp.me](https://decomp.me) and [asm-differ](https://github.com/simonlindholm/asm-differ). Features: + - Compare entire object files: functions and data. - Built-in symbol demangling for C++. (CodeWarrior, Itanium & MSVC) - Automatic rebuild on source file changes. @@ -14,6 +15,7 @@ Features: - Click to highlight all instances of values and registers. Supports: + - PowerPC 750CL (GameCube, Wii) - MIPS (N64, PS1, PS2, PSP) - x86 (COFF only at the moment) @@ -21,6 +23,25 @@ Supports: See [Usage](#usage) for more information. +## Downloads + +To build from source, see [Building](#building). + +### GUI + +- [Windows (x86_64)](https://github.com/encounter/objdiff/releases/latest/download/objdiff-windows-x86_64.exe) +- [Linux (x86_64)](https://github.com/encounter/objdiff/releases/latest/download/objdiff-linux-x86_64) +- [macOS (arm64)](https://github.com/encounter/objdiff/releases/latest/download/objdiff-macos-arm64) +- [macOS (x86_64)](https://github.com/encounter/objdiff/releases/latest/download/objdiff-macos-x86_64) + +For Linux and macOS, run `chmod +x objdiff-*` to make the binary executable. + +### CLI + +CLI binaries can be found on the [releases page](https://github.com/encounter/objdiff/releases). + +## Screenshots + ![Symbol Screenshot](assets/screen-symbols.png) ![Diff Screenshot](assets/screen-diff.png) @@ -141,16 +162,14 @@ Install Rust via [rustup](https://rustup.rs). $ 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 Licensed under either of -* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) -* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) +- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or ) +- MIT license ([LICENSE-MIT](LICENSE-MIT) or ) at your option.