Skip to content

Commit 1044026

Browse files
committed
Release v0.3.0
1 parent 345deac commit 1044026

5 files changed

Lines changed: 133 additions & 121 deletions

File tree

.github/workflows/build.yaml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- "**"
9+
workflow_call:
10+
11+
jobs:
12+
build:
13+
name: Build
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
targets:
18+
[
19+
{
20+
name: windows64,
21+
fancy_name: windows,
22+
runner: windows-latest,
23+
target: x86_64-pc-windows-msvc,
24+
ffmpeg_filename: ffmpeg-6.0-essentials_build.7z,
25+
ffprobe_filename: "",
26+
},
27+
{
28+
name: macos-intel,
29+
fancy_name: macos-intel,
30+
runner: macos-latest,
31+
target: x86_64-apple-darwin,
32+
ffmpeg_filename: ffmpeg6intel.zip,
33+
ffprobe_filename: ffprobe6intel.zip,
34+
},
35+
{
36+
name: macos-arm,
37+
fancy_name: macos-apple-silicon,
38+
runner: macos-latest,
39+
target: aarch64-apple-darwin,
40+
ffmpeg_filename: ffmpeg6arm.zip,
41+
ffprobe_filename: ffprobe6arm.zip,
42+
},
43+
]
44+
runs-on: ${{ matrix.targets.runner }}
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v2
48+
49+
- name: Install toolchain
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: nightly
53+
profile: minimal
54+
override: true
55+
target: ${{ matrix.targets.target }}
56+
57+
- name: Cache dependencies
58+
id: extcache
59+
uses: Swatinem/rust-cache@v2
60+
with:
61+
cache-directories: ${{ github.workspace }}/ext/
62+
prefix-key: "v1"
63+
64+
- name: Install cargo-binstall
65+
uses: taiki-e/install-action@v2
66+
with:
67+
tool: cargo-binstall
68+
69+
- name: Install cargo-wix
70+
if: ${{ matrix.targets.name == 'windows64' }}
71+
run: cargo binstall cargo-wix --no-confirm --force
72+
73+
- name: Install cargo-bundle
74+
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm'}}
75+
run: cargo binstall cargo-bundle --no-confirm --force
76+
77+
- name: Build (Windows)
78+
if: ${{ matrix.targets.name == 'windows64'}}
79+
run: cargo build --release --features windows-installer
80+
81+
- name: Build (MacOS)
82+
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm'}}
83+
run: cargo build --release --target ${{ matrix.targets.target }} --features macos-app-bundle
84+
85+
- name: Extract ffmpeg
86+
run: |
87+
cd ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}
88+
7z x ${{ matrix.targets.ffmpeg_filename }} -aoa
89+
90+
- name: Extract ffprobe
91+
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm' }}
92+
run: |
93+
cd ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}
94+
7z x ${{ matrix.targets.ffprobe_filename }} -aoa
95+
96+
- name: Create Windows installer
97+
if: ${{ matrix.targets.name == 'windows64'}}
98+
continue-on-error: true
99+
run: |
100+
cargo wix --package walksnail-osd-tool --include _deploy\windows\wix\main.wxs --nocapture --no-build
101+
cd ${{ github.workspace }}/target/wix/
102+
7z a temp.zip *.msi
103+
mv temp.zip ${{ github.workspace }}/_deploy/walksnail-osd-tool-${{ matrix.targets.fancy_name }}.zip
104+
shell: cmd
105+
106+
- name: Create Mac App bundle
107+
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm'}}
108+
run: |
109+
cd ./ui
110+
cargo bundle --release --target ${{ matrix.targets.target }} --features macos-app-bundle
111+
cp ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}/ffmpeg ${{ github.workspace }}/target/${{ matrix.targets.target }}/release/bundle/osx/Walksnail\ OSD\ Tool.app/Contents/MacOS/ffmpeg
112+
cp ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}/ffprobe ${{ github.workspace }}/target/${{ matrix.targets.target }}/release/bundle/osx/Walksnail\ OSD\ Tool.app/Contents/MacOS/ffprobe
113+
cd ${{ github.workspace }}/target/${{ matrix.targets.target }}/release/bundle/osx/
114+
115+
codesign --force -s - Walksnail\ OSD\ Tool.app/Contents/MacOS/ffmpeg
116+
codesign --force -s - Walksnail\ OSD\ Tool.app/Contents/MacOS/ffprobe
117+
codesign --force -s - Walksnail\ OSD\ Tool.app/Contents/MacOS/walksnail-osd-tool
118+
codesign --force -s - Walksnail\ OSD\ Tool.app
119+
120+
7z a temp.zip Walksnail\ OSD\ Tool.app
121+
mv temp.zip ${{ github.workspace }}/_deploy/walksnail-osd-tool-${{ matrix.targets.fancy_name }}.zip
122+
123+
- name: Save binaries
124+
uses: actions/upload-artifact@v3
125+
with:
126+
name: walksnail-osd-tool-all-platforms
127+
path: ${{ github.workspace }}/_deploy/*.*

.github/workflows/release.yaml

Lines changed: 3 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -5,130 +5,15 @@ permissions:
55

66
on:
77
push:
8-
branches: master
9-
pull_request:
8+
tags:
9+
- "v*"
1010

1111
jobs:
1212
build:
13-
name: Build
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
targets:
18-
[
19-
{
20-
name: windows64,
21-
fancy_name: windows,
22-
runner: windows-latest,
23-
target: x86_64-pc-windows-msvc,
24-
ffmpeg_filename: ffmpeg-6.0-essentials_build.7z,
25-
ffprobe_filename: "",
26-
},
27-
{
28-
name: macos-intel,
29-
fancy_name: macos-intel,
30-
runner: macos-latest,
31-
target: x86_64-apple-darwin,
32-
ffmpeg_filename: ffmpeg6intel.zip,
33-
ffprobe_filename: ffprobe6intel.zip,
34-
},
35-
{
36-
name: macos-arm,
37-
fancy_name: macos-apple-silicon,
38-
runner: macos-latest,
39-
target: aarch64-apple-darwin,
40-
ffmpeg_filename: ffmpeg6arm.zip,
41-
ffprobe_filename: ffprobe6arm.zip,
42-
},
43-
]
44-
runs-on: ${{ matrix.targets.runner }}
45-
steps:
46-
- name: Checkout code
47-
uses: actions/checkout@v2
48-
49-
- name: Install toolchain
50-
uses: actions-rs/toolchain@v1
51-
with:
52-
toolchain: nightly
53-
profile: minimal
54-
override: true
55-
target: ${{ matrix.targets.target }}
56-
57-
- name: Cache dependencies
58-
id: extcache
59-
uses: Swatinem/rust-cache@v2
60-
with:
61-
cache-directories: ${{ github.workspace }}/ext/
62-
prefix-key: "v1"
63-
64-
- name: Install cargo-binstall
65-
uses: taiki-e/install-action@v2
66-
with:
67-
tool: cargo-binstall
68-
69-
- name: Install cargo-wix
70-
if: ${{ matrix.targets.name == 'windows64' }}
71-
run: cargo binstall cargo-wix --no-confirm --force
72-
73-
- name: Install cargo-bundle
74-
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm'}}
75-
run: cargo binstall cargo-bundle --no-confirm --force
76-
77-
- name: Build (Windows)
78-
if: ${{ matrix.targets.name == 'windows64'}}
79-
run: cargo build --release --features windows-installer
80-
81-
- name: Build (MacOS)
82-
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm'}}
83-
run: cargo build --release --target ${{ matrix.targets.target }} --features macos-app-bundle
84-
85-
- name: Extract ffmpeg
86-
run: |
87-
cd ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}
88-
7z x ${{ matrix.targets.ffmpeg_filename }} -aoa
89-
90-
- name: Extract ffprobe
91-
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm' }}
92-
run: |
93-
cd ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}
94-
7z x ${{ matrix.targets.ffprobe_filename }} -aoa
95-
96-
- name: Create Windows installer
97-
if: ${{ matrix.targets.name == 'windows64'}}
98-
continue-on-error: true
99-
run: |
100-
cargo wix --package walksnail-osd-tool --include _deploy\windows\wix\main.wxs --nocapture --no-build
101-
cd ${{ github.workspace }}/target/wix/
102-
7z a temp.zip *.msi
103-
mv temp.zip ${{ github.workspace }}/_deploy/walksnail-osd-tool-${{ matrix.targets.fancy_name }}.zip
104-
shell: cmd
105-
106-
- name: Create Mac App bundle
107-
if: ${{ matrix.targets.name == 'macos-intel' || matrix.targets.name == 'macos-arm'}}
108-
run: |
109-
cd ./ui
110-
cargo bundle --release --target ${{ matrix.targets.target }} --features macos-app-bundle
111-
cp ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}/ffmpeg ${{ github.workspace }}/target/${{ matrix.targets.target }}/release/bundle/osx/Walksnail\ OSD\ Tool.app/Contents/MacOS/ffmpeg
112-
cp ${{ github.workspace }}/ext/ffmpeg/${{ matrix.targets.name }}/ffprobe ${{ github.workspace }}/target/${{ matrix.targets.target }}/release/bundle/osx/Walksnail\ OSD\ Tool.app/Contents/MacOS/ffprobe
113-
cd ${{ github.workspace }}/target/${{ matrix.targets.target }}/release/bundle/osx/
114-
115-
codesign --force -s - Walksnail\ OSD\ Tool.app/Contents/MacOS/ffmpeg
116-
codesign --force -s - Walksnail\ OSD\ Tool.app/Contents/MacOS/ffprobe
117-
codesign --force -s - Walksnail\ OSD\ Tool.app/Contents/MacOS/walksnail-osd-tool
118-
codesign --force -s - Walksnail\ OSD\ Tool.app
119-
120-
7z a temp.zip Walksnail\ OSD\ Tool.app
121-
mv temp.zip ${{ github.workspace }}/_deploy/walksnail-osd-tool-${{ matrix.targets.fancy_name }}.zip
122-
123-
- name: Save binaries
124-
uses: actions/upload-artifact@v3
125-
with:
126-
name: walksnail-osd-tool-all-platforms
127-
path: ${{ github.workspace }}/_deploy/*.*
13+
uses: ./.github/workflows/build.yaml
12814

12915
release:
13016
name: Create GitHub release
131-
if: startsWith(github.ref, 'refs/tags/')
13217
needs: build
13318
runs-on: ubuntu-latest
13419
steps:

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.3.0] - 2024-03-23
88

99
### Added
1010

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "walksnail-osd-tool"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
edition = "2021"
55
description = "Cross-platform tool for rendering the flight controller OSD and SRT data from the Walksnail Avatar HD FPV system on top of the goggle or VRX recording."
66
authors = ["Alexander van Saase"]

0 commit comments

Comments
 (0)