Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: scripts/fetch-submodules.sh
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
Expand All @@ -20,20 +21,24 @@ jobs:
sudo apt-get update
sudo apt-get install -y clang pkg-config libavcodec-dev libavformat-dev libavutil-dev \
libavfilter-dev libavdevice-dev libswscale-dev libswresample-dev libpipewire-0.3-dev \
libdbus-1-dev libxkbcommon-dev libwayland-dev
libdbus-1-dev libxkbcommon-dev libwayland-dev cmake ninja-build
- run: cargo fmt --all --check
- run: cargo clippy --all-targets -- -D warnings
- run: cargo test
- run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: silkscreen-linux-x64
path: target/release/silkscreen
path: |
target/release/silkscreen
target/release/libpyrowave-shared.so*

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: scripts/fetch-submodules.sh
shell: bash
- uses: dtolnay/rust-toolchain@stable
- name: Fetch FFmpeg (LGPL, shared)
shell: pwsh
Expand All @@ -50,8 +55,10 @@ jobs:
run: |
New-Item -ItemType Directory dist/silkscreen-windows-x64 | Out-Null
Copy-Item target/release/silkscreen.exe dist/silkscreen-windows-x64/
Copy-Item target/release/*pyrowave*.dll dist/silkscreen-windows-x64/
Copy-Item third_party/pyrowave/LICENSE dist/silkscreen-windows-x64/PYROWAVE-LICENSE.txt
foreach ($lib in "avcodec", "avutil", "swresample") { Copy-Item "$env:FFMPEG_DIR/bin/$lib-*.dll" dist/silkscreen-windows-x64/ }
Copy-Item README.md dist/silkscreen-windows-x64/
Copy-Item README.md, LICENSE-MIT, LICENSE-APACHE, THIRD-PARTY-NOTICES.md, THIRD-PARTY-LICENSES.md dist/silkscreen-windows-x64/
- uses: actions/upload-artifact@v4
with:
name: silkscreen-windows-x64
Expand All @@ -61,6 +68,7 @@ jobs:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- run: scripts/fetch-submodules.sh
- uses: dtolnay/rust-toolchain@stable
- run: brew install ffmpeg pkg-config
- run: cargo test
Expand Down
36 changes: 29 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Release

# Builds what can only be built on GitHub's runners (macOS) and attaches it
# to a published release. The other assets are built with scripts/.
# Builds the macOS app and the Linux / Raspberry Pi bundles and attaches them
# to a published release. The Windows zip and the Android APK are built with
# scripts/ (package-windows.sh, build-android.sh) and uploaded by hand.
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Release tag to attach the macOS build to
description: Release tag to attach the builds to
required: true

permissions:
Expand All @@ -21,6 +22,7 @@ jobs:
TAG: ${{ github.event.release.tag_name || inputs.tag }}
steps:
- uses: actions/checkout@v4
- run: scripts/fetch-submodules.sh
- uses: dtolnay/rust-toolchain@stable
- run: brew install ffmpeg pkg-config dylibbundler
- run: cargo build --release -p silkscreen
Expand All @@ -32,21 +34,41 @@ jobs:
cp target/release/silkscreen "$app/MacOS/"
# Copy Homebrew's FFmpeg and its dependencies into the bundle.
dylibbundler -od -b -x "$app/MacOS/silkscreen" -d "$app/Frameworks" -p @executable_path/../Frameworks/
# App icon from the PNGs rendered by scripts/render-icons.sh.
# App icon (on Apple's icon grid) rendered by scripts/render-icons.sh.
set=$RUNNER_TEMP/silkscreen.iconset && mkdir -p "$set"
for s in 16 32 128 256 512; do
cp assets/png/icon-$s.png "$set/icon_${s}x${s}.png"
cp assets/png/icon-$((s * 2)).png "$set/icon_${s}x${s}@2x.png"
cp assets/png/macos/icon-$s.png "$set/icon_${s}x${s}.png"
cp assets/png/macos/icon-$((s * 2)).png "$set/icon_${s}x${s}@2x.png"
done
iconutil -c icns "$set" -o "$app/Resources/silkscreen.icns"
version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "silkscreen") | .version')
sed "s/@VERSION@/$version/g" assets/Info.plist > "$app/Info.plist"
# Rewriting load paths invalidates signatures; Apple Silicon needs one.
for f in "$app"/Frameworks/*.dylib; do codesign --force -s - "$f"; done
codesign --force -s - "$out/Silkscreen.app"
cp README.md "$out/"
cp README.md LICENSE-MIT LICENSE-APACHE THIRD-PARTY-NOTICES.md THIRD-PARTY-LICENSES.md "$out/"
cp third_party/pyrowave/LICENSE "$out/PYROWAVE-LICENSE.txt"
"$app/MacOS/silkscreen" doctor
(cd dist && zip -qry silkscreen-macos-arm64.zip silkscreen-macos-arm64)
- run: gh release upload "$TAG" dist/silkscreen-macos-arm64.zip --clobber
env:
GH_TOKEN: ${{ github.token }}

linux:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
env:
TAG: ${{ github.event.release.tag_name || inputs.tag }}
steps:
- uses: actions/checkout@v4
- run: scripts/fetch-submodules.sh
# The Raspberry Pi (aarch64) bundle builds under emulation.
- uses: docker/setup-qemu-action@v3
if: matrix.arch == 'aarch64'
- run: scripts/package-linux.sh ${{ matrix.arch }}
- run: gh release upload "$TAG" dist/silkscreen-linux-${{ matrix.arch }}.tar.gz --clobber
env:
GH_TOKEN: ${{ github.token }}
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "third_party/pyrowave"]
path = third_party/pyrowave
url = https://github.com/Themaister/pyrowave.git
[submodule "third_party/granite"]
path = third_party/granite
url = https://github.com/Themaister/Granite.git
Loading
Loading