Skip to content

Commit

Permalink
Add glow feature and generate wgpu & glow variants for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fengalin committed Jan 28, 2024
1 parent 109b67d commit e70a3dc
Show file tree
Hide file tree
Showing 4 changed files with 194 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ jobs:
shell: bash

- name: Build for x86_64
run: cargo build --release
run: |
cargo build --release
mv target/relase/jstation-controller target/release/jstation-controller-wgpu
cargo build --release --features glow
mv target/relase/jstation-controller target/release/jstation-controller-glow
- name: Build for aarch64
run: |
Expand All @@ -111,6 +115,9 @@ jobs:
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
cargo build --release --target=aarch64-apple-darwin
mv target/aarch64-apple-darwin/relase/jstation-controller target/aarch64-apple-darwin/release/jstation-controller-wgpu
cargo build --release --target=aarch64-apple-darwin --features glow
mv target/aarch64-apple-darwin/relase/jstation-controller target/aarch64-apple-darwin/release/jstation-controller-glow
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
shell: bash
Expand All @@ -123,7 +130,8 @@ jobs:
mkdir -p temp/${{ env.app_variant }}
cp README.md temp/${{ env.app_variant }}/
cargo-about generate -o temp/${{ env.app_variant }}/LICENSES.html about.hbs
lipo target/release/${APP_NAME} target/aarch64-apple-darwin/release/${APP_NAME} -output temp/${{ env.app_variant }}/${APP_NAME} -create
lipo target/release/${APP_NAME}-wgpu target/aarch64-apple-darwin/release/${APP_NAME}-wgpu -output temp/${{ env.app_variant }}/${APP_NAME}-wgpu -create
lipo target/release/${APP_NAME}-glow target/aarch64-apple-darwin/release/${APP_NAME}-glow -output temp/${{ env.app_variant }}/${APP_NAME}-glow -create
mkdir -p packages
cd packages
TAR=${{ env.app_variant }}.tar.gz
Expand Down
178 changes: 177 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bitflags = "2.4"
env_logger = "0.11"
flume = "0.11"
iced = { version = "0.9", features = [ "smol" ] }
iced_audio = "0.12"
iced_audio = { version = "0.12", default-features = false }
iced_lazy = "0.6.1"
iced_native = "0.10.3"
jstation_derive = { path = "jstation_derive" }
Expand All @@ -27,5 +27,10 @@ smallvec = { version = "1.10", features = [ "union" ] }
smol = "1.3"
thiserror = "1.0"

[features]
default = ["wgpu"]
wgpu = ["iced/wgpu", "iced_audio/wgpu"]
glow = ["iced/glow", "iced_audio/glow"]

[profile.release]
lto = true
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ allow = [
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"ISC",
"MIT",
"MIT-0",
Expand Down

0 comments on commit e70a3dc

Please sign in to comment.