Skip to content

Commit 771a141

Browse files
committed
Version 0.2.0
- Update checker & auto-updater - Configure font sizes and diff colors - Data diffing bug fixes & improvements - Bug fix for low match percent - Improvements to Jobs UI (cancel, dismiss errors) - "Demangle" tool Closes #6, #13, #17, #19
1 parent 2f2efb4 commit 771a141

26 files changed

+2223
-464
lines changed

.github/workflows/build.yaml

Lines changed: 98 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,126 @@ on:
88
- 'LICENSE*'
99
workflow_dispatch:
1010

11+
env:
12+
CARGO_BIN_NAME: objdiff
13+
CARGO_TARGET_DIR: target
14+
1115
jobs:
1216
check:
1317
name: Check
1418
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
toolchain: [ stable, 1.62.0, nightly ]
18-
fail-fast: false
1919
env:
2020
RUSTFLAGS: -D warnings
2121
steps:
2222
- name: Install dependencies
23-
run: |
24-
sudo apt install libgtk-3-dev
25-
- uses: actions/checkout@v2
26-
- uses: actions-rs/toolchain@v1
23+
run: sudo apt-get -y install libgtk-3-dev
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
- name: Setup Rust toolchain
27+
uses: dtolnay/rust-toolchain@stable
2728
with:
28-
profile: minimal
29-
toolchain: ${{ matrix.toolchain }}
30-
override: true
3129
components: rustfmt, clippy
30+
- name: Cargo check
31+
run: cargo check --all-features
32+
- name: Cargo clippy
33+
run: cargo clippy --all-features
34+
35+
deny:
36+
name: Deny
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
checks:
41+
- advisories
42+
- bans licenses sources
43+
# Prevent new advisories from failing CI
44+
continue-on-error: ${{ matrix.checks == 'advisories' }}
45+
steps:
46+
- uses: actions/checkout@v3
3247
- uses: EmbarkStudios/cargo-deny-action@v1
33-
- uses: actions-rs/cargo@v1
34-
with:
35-
command: check
36-
args: --all-features
37-
- uses: actions-rs/cargo@v1
3848
with:
39-
command: clippy
40-
args: --all-features
49+
command: check ${{ matrix.checks }}
50+
51+
test:
52+
name: Test
53+
strategy:
54+
matrix:
55+
platform: [ ubuntu-latest, windows-latest, macos-latest ]
56+
fail-fast: false
57+
runs-on: ${{ matrix.platform }}
58+
steps:
59+
- name: Install dependencies
60+
if: matrix.platform == 'ubuntu-latest'
61+
run: sudo apt-get -y install libgtk-3-dev
62+
- name: Checkout
63+
uses: actions/checkout@v3
64+
- name: Setup Rust toolchain
65+
uses: dtolnay/rust-toolchain@stable
66+
- name: Cargo test
67+
run: cargo test --release --all-features
4168

4269
build:
4370
name: Build
4471
strategy:
4572
matrix:
46-
platform: [ ubuntu-latest, macos-latest, windows-latest ]
47-
toolchain: [ stable, 1.62.0, nightly ]
73+
include:
74+
- platform: ubuntu-latest
75+
target: x86_64-unknown-linux-gnu
76+
name: linux-x86_64
77+
packages: libgtk-3-dev
78+
- platform: windows-latest
79+
target: x86_64-pc-windows-msvc
80+
name: windows-x86_64
81+
- platform: macos-latest
82+
target: x86_64-apple-darwin
83+
name: macos-x86_64
84+
- platform: macos-latest
85+
target: aarch64-apple-darwin
86+
name: macos-arm64
4887
fail-fast: false
4988
runs-on: ${{ matrix.platform }}
5089
steps:
5190
- name: Install dependencies
52-
if: matrix.platform == 'ubuntu-latest'
53-
run: |
54-
sudo apt install libgtk-3-dev
55-
- uses: actions/checkout@v2
56-
- uses: actions-rs/toolchain@v1
91+
if: matrix.packages != ''
92+
run: sudo apt-get -y install ${{ matrix.packages }}
93+
- name: Checkout
94+
uses: actions/checkout@v3
95+
- name: Setup Rust toolchain
96+
uses: dtolnay/rust-toolchain@stable
5797
with:
58-
profile: minimal
59-
toolchain: ${{ matrix.toolchain }}
60-
override: true
61-
- uses: actions-rs/cargo@v1
98+
targets: ${{ matrix.target }}
99+
- name: Cargo build
100+
run: cargo build --release --all-features --target ${{ matrix.target }} --bin ${{ env.CARGO_BIN_NAME }}
101+
- name: Upload artifacts
102+
uses: actions/upload-artifact@v3
62103
with:
63-
command: test
64-
args: --release --all-features
65-
- uses: actions-rs/cargo@v1
104+
name: ${{ matrix.name }}
105+
path: |
106+
${{ env.CARGO_TARGET_DIR }}/release/${{ env.CARGO_BIN_NAME }}
107+
${{ env.CARGO_TARGET_DIR }}/release/${{ env.CARGO_BIN_NAME }}.exe
108+
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release/${{ env.CARGO_BIN_NAME }}
109+
${{ env.CARGO_TARGET_DIR }}/${{ matrix.target }}/release/${{ env.CARGO_BIN_NAME }}.exe
110+
if-no-files-found: error
111+
112+
release:
113+
name: Release
114+
if: startsWith(github.ref, 'refs/tags/')
115+
runs-on: ubuntu-latest
116+
needs: [ build ]
117+
steps:
118+
- name: Download artifacts
119+
uses: actions/download-artifact@v3
66120
with:
67-
command: build
68-
args: --release --all-features
69-
- uses: actions/upload-artifact@v2
121+
path: artifacts
122+
- name: Rename artifacts
123+
working-directory: artifacts
124+
run: |
125+
mkdir ../out
126+
for i in */*/release/$CARGO_BIN_NAME*; do
127+
mv "$i" "../out/$(sed -E "s/([^/]+)\/[^/]+\/release\/($CARGO_BIN_NAME)/\2-\1/" <<< "$i")"
128+
done
129+
ls -R ../out
130+
- name: Release
131+
uses: softprops/action-gh-release@v1
70132
with:
71-
name: ${{ matrix.platform }}-${{ matrix.toolchain }}
72-
path: |
73-
target/release/objdiff
74-
target/release/objdiff.exe
133+
files: out/*

0 commit comments

Comments
 (0)