Skip to content

Commit

Permalink
build with Docker & QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jan 30, 2024
1 parent fac68fc commit 324a063
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/build-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,35 +86,28 @@ jobs:

linux:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Install dependencies
run: |
yum install -y alsa-lib-devel
- uses: actions/checkout@v4
- name: checkout portaudio
# NB: v4 doesn't seem to work with the manylinux2014 image:
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: PortAudio/portaudio
ref: v19.7.0
path: portaudio
- name: cmake configure
- name: Set up QEMU
#if: ${{ endsWith(matrix.image, 'aarch64') }}
uses: docker/setup-qemu-action@v3
- name: Build PortAudio in Docker
run: |
cmake -S portaudio -B build -D CMAKE_BUILD_TYPE=Release -D PA_USE_JACK=OFF
- name: cmake build
run: |
cmake --build build
docker run --rm -v ${{ github.workspace }}:/cwd:rw --workdir=/cwd quay.io/pypa/manylinux2014_aarch64 ./build-linux.sh
- name: move .so file
run: |
mv build/libportaudio.so libportaudio-x86_64.so
- name: show some information about the .so file
run: |
ldd libportaudio-x86_64.so
mv build/libportaudio.so libportaudio-aarch64.so
- name: upload .so file
uses: actions/upload-artifact@v3
with:
name: linux-so
path: libportaudio-x86_64.so
path: libportaudio-aarch64.so

push:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions build-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -euxo pipefail

yum install -y alsa-lib-devel

cmake -S portaudio -B build -D CMAKE_BUILD_TYPE=Release -D PA_USE_JACK=OFF
cmake --build build

ldd build/libportaudio.so
File renamed without changes.

0 comments on commit 324a063

Please sign in to comment.