-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add CD support for armv6 and armv7 #479
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3d7d905
Add armhf workflow to produce ARMv7 (maybe ARMv6?) binaries
nicokaiser b6e84d1
build: Rename deps_root to sysroot to match ARM v6 toolchain
nicokaiser ac6c6e3
Add armv6 workflow
nicokaiser 2212153
Fix armhf full builds and armv6-lite
nicokaiser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
build_target: [macos, macos-rodio, linux] | ||
build_target: [macos, macos-rodio, linux, linux-armhf, linux-armv6] | ||
rust: [stable] | ||
artifact_type: ['slim', 'full'] # The build strategy will build both types for each OS specified | ||
include: | ||
|
@@ -34,22 +34,92 @@ jobs: | |
artifact_prefix: linux | ||
audio_backend: alsa | ||
target: x86_64-unknown-linux-gnu | ||
- build_target: linux-armhf | ||
os: ubuntu-18.04 | ||
artifact_prefix: linux-armhf | ||
audio_backend: alsa | ||
target: arm-unknown-linux-gnueabihf | ||
- build_target: linux-armv6 | ||
os: ubuntu-18.04 | ||
artifact_prefix: linux-armv6 | ||
audio_backend: alsa | ||
target: arm-unknown-linux-gnueabihf | ||
exclude: | ||
- build_target: linux-armv6 | ||
artifact_type: 'full' # Raspberry Pi toolchain is too old for dbus/systemd | ||
|
||
steps: | ||
- name: Installing Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
target: ${{ matrix.target }} | ||
override: true | ||
- name: Installing needed macOS dependencies | ||
if: matrix.os == 'macos-latest' | ||
run: brew install awk dbus pkg-config portaudio | ||
- name: Installing needed Ubuntu dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-18.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y -qq libasound2-dev libssl-dev libpulse-dev libdbus-1-dev | ||
|
||
- name: Installing needed Ubuntu armhf dependencies | ||
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armhf' | ||
run: | | ||
sudo mkdir -p /build/sysroot | ||
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list | ||
sudo apt-get update | ||
sudo apt-get install -y -qq gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross | ||
sudo apt-get download libasound2:armhf libasound2-dev:armhf libssl-dev:armhf libssl1.1:armhf | ||
sudo dpkg -x libasound2_*.deb /build/sysroot/ | ||
sudo dpkg -x libssl-dev*.deb /build/sysroot/ | ||
sudo dpkg -x libssl1.1*.deb /build/sysroot/ | ||
sudo dpkg -x libasound2-dev*.deb /build/sysroot/ | ||
echo "::set-env name=PKG_CONFIG_ALLOW_CROSS::1" | ||
echo "::set-env name=RUSTFLAGS::-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/build/sysroot/usr/lib/arm-linux-gnueabihf -L/build/sysroot/lib/arm-linux-gnueabihf" | ||
echo "::set-env name=C_INCLUDE_PATH::/build/sysroot/usr/include" | ||
echo "::set-env name=OPENSSL_LIB_DIR::/build/sysroot/usr/lib/arm-linux-gnueabihf" | ||
echo "::set-env name=OPENSSL_INCLUDE_DIR::/build/sysroot/usr/include/arm-linux-gnueabihf" | ||
- name: Installing needed Ubuntu armv6 dependencies | ||
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armv6' | ||
run: | | ||
sudo mkdir -p /build/sysroot | ||
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list | ||
sudo apt-get update | ||
sudo apt-get install -y -qq git | ||
sudo git -C /build clone --depth=1 https://github.com/raspberrypi/tools.git | ||
sudo apt-get download libasound2:armhf libasound2-dev:armhf libssl-dev:armhf libssl1.1:armhf | ||
sudo dpkg -x libasound2_*.deb /build/sysroot/ | ||
sudo dpkg -x libssl-dev*.deb /build/sysroot/ | ||
sudo dpkg -x libssl1.1*.deb /build/sysroot/ | ||
sudo dpkg -x libasound2-dev*.deb /build/sysroot/ | ||
echo "::add-path::/build/tools/arm-bcm2708/arm-linux-gnueabihf/bin" | ||
echo "::set-env name=PKG_CONFIG_ALLOW_CROSS::1" | ||
echo "::set-env name=RUSTFLAGS::-C linker=/build/tools/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -L/build/tools/arm-bcm2708/arm-linux-gnueabihf/arm-linux-gnueabihf/sysroot/lib -L/build/tools/arm-bcm2708/arm-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/lib -L/build/sysroot/usr/lib/arm-linux-gnueabihf -L/build/sysroot/lib/arm-linux-gnueabihf" | ||
echo "::set-env name=C_INCLUDE_PATH::/build/sysroot/usr/include" | ||
echo "::set-env name=OPENSSL_LIB_DIR::/build/sysroot/usr/lib/arm-linux-gnueabihf" | ||
echo "::set-env name=OPENSSL_INCLUDE_DIR::/build/sysroot/usr/include/arm-linux-gnueabihf" | ||
- name: Installing needed Ubuntu armhf dependencies (full) | ||
if: matrix.os == 'ubuntu-18.04' && matrix.build_target == 'linux-armhf' && matrix.artifact_type == 'full' | ||
run: | | ||
# Make dbus-rs cross-compile, see https://github.com/diwic/dbus-rs/issues/184#issuecomment-520228758 | ||
sudo apt-get download libdbus-1-dev:armhf libdbus-1-3:armhf libsystemd0:armhf libgcrypt20:armhf liblzma5:armhf liblz4-1:armhf libgpg-error0:armhf | ||
sudo dpkg -x libdbus-1-3*.deb /build/sysroot/ | ||
sudo dpkg -x libdbus-1-dev*.deb /build/sysroot/ | ||
sudo dpkg -x libsystemd0*.deb /build/sysroot/ | ||
sudo dpkg -x libgcrypt20_*.deb /build/sysroot/ | ||
sudo dpkg -x liblzma5_*.deb /build/sysroot/ | ||
sudo dpkg -x liblz4-1_*.deb /build/sysroot/ | ||
sudo dpkg -x libgpg-error0_*.deb /build/sysroot/ | ||
sudo cp -r /build/sysroot/lib/* /build/sysroot/usr/lib/ | ||
sudo ln -frs /build/sysroot/lib/arm-linux-gnueabihf/libdbus-1.so.3 /build/sysroot/lib/arm-linux-gnueabihf/libdbus-1.so | ||
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libgcrypt.so.20 /build/sysroot/lib/arm-linux-gnueabihf/libgcrypt.so | ||
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libgpg-error.so.0 /build/sysroot/lib/arm-linux-gnueabihf/libgpg-error.so | ||
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/liblzma.so.5 /build/sysroot/lib/arm-linux-gnueabihf/liblzma.so | ||
sudo ln -rs /build/sysroot/lib/arm-linux-gnueabihf/libsystemd.so.0 /build/sysroot/lib/arm-linux-gnueabihf/libsystemd.so | ||
sudo ln -rs /build/sysroot/usr/lib/arm-linux-gnueabihf/liblz4.so.1 /build/sysroot/usr/lib/arm-linux-gnueabihf/liblz4.so | ||
sudo mkdir -p /.cargo | ||
echo -e '[target.arm-unknown-linux-gnueabihf.dbus]\nrustc-link-lib = ["dbus-1", "gcrypt", "gpg-error", "lz4", "lzma", "systemd"]' | sudo tee -a /.cargo/config | ||
- name: Checking out sources | ||
uses: actions/checkout@v1 | ||
- name: Running cargo build | ||
|
@@ -58,16 +128,12 @@ jobs: | |
command: build | ||
toolchain: ${{ matrix.rust }} | ||
args: --locked --release --target ${{ matrix.target }} --no-default-features --features "${{ matrix.feature }},${{ matrix.audio_backend }}_backend" | ||
|
||
- name: Packaging final binary | ||
shell: bash | ||
run: | | ||
cd target/${{ matrix.target }}/release | ||
|
||
strip spotifyd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
tar czvf spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz spotifyd | ||
shasum -a 512 spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.tar.gz > spotifyd-${{ matrix.artifact_prefix }}-${{ matrix.artifact_type }}.sha512 | ||
|
||
- name: Releasing assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since "bionic" is needed when adding the Ubuntu Ports source later, this must be hard-coded to
ubuntu-18.04
.