Update CI workflow & all dependencies
This commit is contained in:
parent
9dfdbb9301
commit
8b793b5616
|
@ -1,16 +1,17 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- 'LICENSE*'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILD_PROFILE: release-lto
|
||||
CARGO_BIN_NAME: dtk
|
||||
CARGO_TARGET_DIR: target
|
||||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
check:
|
||||
|
@ -78,7 +79,9 @@ jobs:
|
|||
run: cargo test --release --all-features
|
||||
|
||||
build:
|
||||
name: Build
|
||||
name: Build dtk
|
||||
env:
|
||||
CARGO_BIN_NAME: dtk
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
@ -86,52 +89,52 @@ jobs:
|
|||
target: x86_64-unknown-linux-musl
|
||||
name: linux-x86_64
|
||||
build: zigbuild
|
||||
features: default
|
||||
- platform: ubuntu-latest
|
||||
target: i686-unknown-linux-musl
|
||||
name: linux-i686
|
||||
build: zigbuild
|
||||
features: default
|
||||
- platform: ubuntu-latest
|
||||
target: aarch64-unknown-linux-musl
|
||||
name: linux-aarch64
|
||||
build: zigbuild
|
||||
features: default
|
||||
- platform: ubuntu-latest
|
||||
target: armv7-unknown-linux-musleabi
|
||||
name: linux-armv7l
|
||||
build: zigbuild
|
||||
features: default
|
||||
- platform: windows-latest
|
||||
target: i686-pc-windows-msvc
|
||||
name: windows-x86
|
||||
build: build
|
||||
features: default
|
||||
- platform: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
name: windows-x86_64
|
||||
build: build
|
||||
features: default
|
||||
- platform: windows-latest
|
||||
target: aarch64-pc-windows-msvc
|
||||
name: windows-arm64
|
||||
build: build
|
||||
features: default
|
||||
- platform: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
name: macos-x86_64
|
||||
build: build
|
||||
features: default
|
||||
- platform: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
name: macos-arm64
|
||||
build: build
|
||||
features: default
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Check git tag against Cargo version
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
shell: bash
|
||||
run: |
|
||||
set -eou
|
||||
version=$(grep '^version' Cargo.toml | awk -F' = ' '{print $2}' | tr -d '"')
|
||||
version="v$version"
|
||||
tag='${{github.ref}}'
|
||||
tag="${tag#refs/tags/}"
|
||||
if [ "$tag" != "$version" ]; then
|
||||
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
|
||||
exit 1
|
||||
fi
|
||||
- name: Install dependencies
|
||||
if: matrix.packages != ''
|
||||
run: |
|
||||
|
@ -139,20 +142,20 @@ jobs:
|
|||
sudo apt-get -y install ${{ matrix.packages }}
|
||||
- name: Install cargo-zigbuild
|
||||
if: matrix.build == 'zigbuild'
|
||||
run: pip install ziglang==0.12.0 cargo-zigbuild==0.18.4
|
||||
run: pip install ziglang==0.13.0 cargo-zigbuild==0.19.1
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
- name: Cargo build
|
||||
run: cargo ${{ matrix.build }} --profile ${{ env.BUILD_PROFILE }} --all-features --target ${{ matrix.target }} --bin ${{ env.CARGO_BIN_NAME }}
|
||||
run: >
|
||||
cargo ${{ matrix.build }} --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }}
|
||||
--bin ${{ env.CARGO_BIN_NAME }} --features ${{ matrix.features }}
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
name: ${{ env.CARGO_BIN_NAME }}-${{ matrix.name }}
|
||||
path: |
|
||||
${{ env.CARGO_TARGET_DIR }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}
|
||||
${{ env.CARGO_TARGET_DIR }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}.exe
|
||||
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}
|
||||
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/${{ env.BUILD_PROFILE }}/${{ env.CARGO_BIN_NAME }}.exe
|
||||
if-no-files-found: error
|
||||
|
@ -162,7 +165,23 @@ jobs:
|
|||
if: startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ]
|
||||
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:
|
||||
|
@ -170,12 +189,28 @@ jobs:
|
|||
- name: Rename artifacts
|
||||
working-directory: artifacts
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir ../out
|
||||
for i in */*/$BUILD_PROFILE/$CARGO_BIN_NAME*; do
|
||||
mv "$i" "../out/$(sed -E "s/([^/]+)\/[^/]+\/$BUILD_PROFILE\/($CARGO_BIN_NAME)/\2-\1/" <<< "$i")"
|
||||
for dir in */; do
|
||||
for file in "$dir"*; do
|
||||
base=$(basename "$file")
|
||||
name="${base%.*}"
|
||||
ext="${base##*.}"
|
||||
if [ "$ext" = "$base" ]; then
|
||||
ext=""
|
||||
else
|
||||
ext=".$ext"
|
||||
fi
|
||||
arch="${dir%/}" # remove trailing slash
|
||||
arch="${arch##"$name-"}" # remove bin name
|
||||
dst="../out/${name}-${arch}${ext}"
|
||||
mv "$file" "$dst"
|
||||
done
|
||||
done
|
||||
ls -R ../out
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: out/*
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
|
|
File diff suppressed because it is too large
Load Diff
97
Cargo.toml
97
Cargo.toml
|
@ -3,7 +3,7 @@ name = "decomp-toolkit"
|
|||
description = "Yet another GameCube/Wii decompilation toolkit."
|
||||
authors = ["Luke Street <luke@street.dev>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
version = "0.9.6"
|
||||
version = "0.9.7"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
repository = "https://github.com/encounter/decomp-toolkit"
|
||||
|
@ -20,56 +20,57 @@ panic = "abort"
|
|||
|
||||
[profile.release-lto]
|
||||
inherits = "release"
|
||||
lto = "thin"
|
||||
lto = "fat"
|
||||
strip = "debuginfo"
|
||||
codegen-units = 1
|
||||
|
||||
[dependencies]
|
||||
anyhow = { version = "1.0.82", features = ["backtrace"] }
|
||||
anyhow = { version = "1.0", features = ["backtrace"] }
|
||||
ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "write_symbol_table" }
|
||||
argp = "0.3.0"
|
||||
base16ct = "0.2.0"
|
||||
base64 = "0.22.1"
|
||||
crossterm = "0.27.0"
|
||||
cwdemangle = "1.0.0"
|
||||
enable-ansi-support = "0.2.1"
|
||||
filetime = "0.2.23"
|
||||
fixedbitset = "0.5.7"
|
||||
flagset = { version = "0.4.5", features = ["serde"] }
|
||||
glob = "0.3.1"
|
||||
hex = "0.4.3"
|
||||
indent = "0.1.1"
|
||||
indexmap = "2.2.6"
|
||||
itertools = "0.12.1"
|
||||
log = "0.4.21"
|
||||
memchr = "2.7.2"
|
||||
memmap2 = "0.9.4"
|
||||
multimap = "0.10.0"
|
||||
nintendo-lz = "0.1.3"
|
||||
nodtool = "1.2.0"
|
||||
argp = "0.3"
|
||||
base16ct = "0.2"
|
||||
base64 = "0.22"
|
||||
crossterm = "0.28"
|
||||
cwdemangle = "1.0"
|
||||
enable-ansi-support = "0.2"
|
||||
filetime = "0.2"
|
||||
fixedbitset = "0.5"
|
||||
flagset = { version = "0.4", features = ["serde"] }
|
||||
glob = "0.3"
|
||||
hex = "0.4"
|
||||
indent = "0.1"
|
||||
indexmap = "2.5"
|
||||
itertools = "0.13"
|
||||
log = "0.4"
|
||||
memchr = "2.7"
|
||||
memmap2 = "0.9"
|
||||
multimap = "0.10"
|
||||
nintendo-lz = "0.1"
|
||||
nodtool = "1.2"
|
||||
#nodtool = { path = "../nod-rs/nodtool" }
|
||||
num_enum = "0.7.2"
|
||||
objdiff-core = { git = "https://github.com/encounter/objdiff", rev = "a5a6a3928e392d5af5d92826e73b77e074b8788c", features = ["ppc"] }
|
||||
num_enum = "0.7"
|
||||
objdiff-core = { version = "2.0", features = ["ppc"] }
|
||||
#objdiff-core = { path = "../objdiff/objdiff-core", features = ["ppc"] }
|
||||
object = { version = "0.35.0", features = ["read_core", "std", "elf", "write_std"], default-features = false }
|
||||
once_cell = "1.19.0"
|
||||
orthrus-ncompress = "0.2.1"
|
||||
owo-colors = { version = "4.0.0", features = ["supports-colors"] }
|
||||
path-slash = "0.2.1"
|
||||
petgraph = { version = "0.6.4", default-features = false }
|
||||
ppc750cl = { git = "https://github.com/encounter/ppc750cl", rev = "6cbd7d888c7082c2c860f66cbb9848d633f753ed" }
|
||||
rayon = "1.10.0"
|
||||
regex = "1.10.4"
|
||||
rustc-hash = "1.1.0"
|
||||
sanitise-file-name = "1.0.0"
|
||||
serde = "1.0.199"
|
||||
serde_json = "1.0.116"
|
||||
serde_repr = "0.1.19"
|
||||
serde_yaml = "0.9.34"
|
||||
sha-1 = "0.10.1"
|
||||
supports-color = "3.0.0"
|
||||
syntect = { version = "5.2.0", features = ["parsing", "regex-fancy", "dump-load"], default-features = false }
|
||||
tracing = "0.1.40"
|
||||
tracing-attributes = "0.1.27"
|
||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||
xxhash-rust = { version = "0.8.10", features = ["xxh3"] }
|
||||
zerocopy = { version = "0.7.34", features = ["derive"] }
|
||||
object = { version = "0.36", features = ["read_core", "std", "elf", "write_std"], default-features = false }
|
||||
once_cell = "1.19"
|
||||
orthrus-ncompress = "0.2"
|
||||
owo-colors = { version = "4.0", features = ["supports-colors"] }
|
||||
path-slash = "0.2"
|
||||
petgraph = { version = "0.6", default-features = false }
|
||||
ppc750cl = "0.3"
|
||||
rayon = "1.10"
|
||||
regex = "1.10"
|
||||
rustc-hash = "2.0"
|
||||
sanitise-file-name = "1.0"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_repr = "0.1"
|
||||
serde_yaml = "0.9"
|
||||
sha-1 = "0.10"
|
||||
supports-color = "3.0"
|
||||
syntect = { version = "5.2", features = ["parsing", "regex-fancy", "dump-load"], default-features = false }
|
||||
tracing = "0.1"
|
||||
tracing-attributes = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
xxhash-rust = { version = "0.8", features = ["xxh3"] }
|
||||
zerocopy = { version = "0.7", features = ["derive"] }
|
||||
|
|
|
@ -308,7 +308,7 @@ fn fixup(args: FixupArgs) -> Result<()> {
|
|||
let mut addr_to_sym: BTreeMap<SectionId, BTreeMap<u32, SymbolId>> = BTreeMap::new();
|
||||
for symbol in in_file.symbols() {
|
||||
// Skip section and file symbols, we wrote them above
|
||||
if matches!(symbol.kind(), SymbolKind::Section | SymbolKind::File | SymbolKind::Null) {
|
||||
if matches!(symbol.kind(), SymbolKind::Section | SymbolKind::File) {
|
||||
symbol_ids.push(None);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ pub fn process_code(
|
|||
section: &ObjSection,
|
||||
config: &DiffObjConfig,
|
||||
) -> Result<ProcessCodeResult> {
|
||||
let arch = objdiff_core::arch::ppc::ObjArchPpc {};
|
||||
let arch = objdiff_core::arch::ppc::ObjArchPpc { extab: None };
|
||||
let orig_relocs = section
|
||||
.relocations
|
||||
.range(symbol.address as u32..symbol.address as u32 + symbol.size as u32)
|
||||
|
@ -224,8 +224,11 @@ fn print_line(ins_diff: &ObjInsDiff, base_addr: u64) -> Vec<Span> {
|
|||
base_color = COLOR_ROTATION[diff.idx % COLOR_ROTATION.len()]
|
||||
}
|
||||
}
|
||||
DiffText::BranchDest(addr) => {
|
||||
DiffText::BranchDest(addr, diff) => {
|
||||
label_text = format!("{addr:x}");
|
||||
if let Some(diff) = diff {
|
||||
base_color = COLOR_ROTATION[diff.idx % COLOR_ROTATION.len()]
|
||||
}
|
||||
}
|
||||
DiffText::Symbol(sym) => {
|
||||
let name = sym.demangled_name.as_ref().unwrap_or(&sym.name);
|
||||
|
@ -297,6 +300,7 @@ fn to_objdiff_symbol(
|
|||
flags,
|
||||
addend,
|
||||
virtual_address: None,
|
||||
original_index: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ where P: AsRef<Path> {
|
|||
}
|
||||
|
||||
// Generate symbols
|
||||
if matches!(symbol.kind(), SymbolKind::Null | SymbolKind::File)
|
||||
if matches!(symbol.kind(), SymbolKind::File)
|
||||
|| matches!(symbol.section_index(), Some(idx) if section_indexes[idx.0].is_none())
|
||||
{
|
||||
symbol_indexes.push(None);
|
||||
|
|
Loading…
Reference in New Issue