Skip to content

Commit

Permalink
Update build_librespot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jan 15, 2025
1 parent 0b71095 commit 4ba79dc
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions .github/workflows/build_librespot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
CARGO_TERM_COLOR: always

jobs:
macOS:
macos:
runs-on: macos-11.0

steps:
Expand Down Expand Up @@ -40,7 +40,39 @@ jobs:
name: librespot-mac
path: releases/

Linux:
linux:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare build environment
run: |
rustup target add x86_64-unknown-linux-gnu
rustup target add i686-unknown-linux-gnu
curl -L https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz | tar xvz
mkdir -p releases/linux
- name: Build x86_64
run: |
cargo build --release --target=x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/librespot releases/linux/librespot-linux-x86_64
chmod +x releases/linux/librespot-linux-x86_64
- name: Build ARMv8
run: |
./cross build --release --target=aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/librespot releases/linux/librespot-linux-aarch64
chmod +x releases/linux/librespot-linux-aarch64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: librespot-linux
path: releases/

linux-musl:
runs-on: ubuntu-20.04

steps:
Expand All @@ -64,16 +96,16 @@ jobs:
run: |
cargo build --release --target=x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/librespot releases/linux/librespot-linux-x86_64
chmod +x releases/linux/librespot-linux-x86_64
chmod +x releases/linux/librespot-linux-musl-x86_64
- name: Build ARMv8
run: |
./cross build --release --target=aarch64-unknown-linux-musl
cp target/aarch64-unknown-linux-musl/release/librespot releases/linux/librespot-linux-aarch64
chmod +x releases/linux/librespot-linux-aarch64
chmod +x releases/linux/librespot-linux-musl-aarch64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: librespot-linux
name: librespot-linux-musl
path: releases/

0 comments on commit 4ba79dc

Please sign in to comment.