mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
92 lines
3.1 KiB
YAML
92 lines
3.1 KiB
YAML
name: Build artifacts
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
# TODO: Add another job for Ubuntu 20.04
|
|
build-bionic:
|
|
name: Build on Ubuntu 18.04
|
|
container:
|
|
# This container contains everything needed to build yabridge except for
|
|
# Boost since that's not easily available and it the parts we need are
|
|
# quick to compile anyway
|
|
image: robbert/docker-yabridge:bionic
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Compile Bosot
|
|
run: |
|
|
set -e
|
|
|
|
cd /tmp
|
|
wget --max-redirect 3 https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
|
|
sha256sum -c <<<"c66e88d5786f2ca4dbebb14e06b566fb642a1a6947ad8cc9091f9f445134143f boost_1_72_0.tar.gz"
|
|
tar -xf boost_1_72_0.tar.gz
|
|
rm boost_1_72_0.tar.gc
|
|
|
|
cd boost_1_72_0
|
|
./bootstrap.sh --with-toolset=gcc --with-icu --with-python=
|
|
|
|
# 32-bit build
|
|
./b2 \
|
|
variant=release \
|
|
debug-symbols=off \
|
|
threading=multi \
|
|
runtime-link=shared \
|
|
link=shared,static \
|
|
toolset=gcc \
|
|
address-model=32 \
|
|
cflags="${CPPFLAGS} ${CFLAGS} -m32 -fPIC -O3" \
|
|
cxxflags="${CPPFLAGS} ${CXXFLAGS} -m32 -std=c++14 -fPIC -O3" \
|
|
linkflags="${LDFLAGS} -m32" \
|
|
--with-filesystem \
|
|
--libdir=/usr/local/lib/i386-linux-gnu \
|
|
-j $(nproc) \
|
|
\
|
|
install
|
|
|
|
# 64-bit build
|
|
./b2 \
|
|
variant=release \
|
|
debug-symbols=off \
|
|
threading=multi \
|
|
runtime-link=shared \
|
|
link=shared,static \
|
|
toolset=gcc \
|
|
address-model=64 \
|
|
cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
|
|
cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
|
|
--with-filesystem \
|
|
-j $(nproc) \
|
|
\
|
|
install
|
|
- name: Build the binaries
|
|
run: |
|
|
# I'm not sure why, but on Ubuntu 18.04 the path to the wrap patch
|
|
# files is relative to the current working directory rather than the
|
|
# build directory
|
|
sed -i 's#file:\.\./subprojects#file:./subprojects#' subprojects/*.wrap
|
|
|
|
meson setup --buildtype=release --cross-file cross-wine.conf -Duse-bitbridge=true build
|
|
ninja -C build
|
|
- name: Create an archive for the binaries
|
|
run: |
|
|
set -e
|
|
export ARCHIVE_NAME=yabridge-$(git describe --always)-ubuntu-18.04.tar.gz
|
|
|
|
mkdir yabridge
|
|
cp build/{libyabridge.so,yabridge-host.exe{,.so},yabridge-host-32.exe{,.so}} yabridge
|
|
cp README.md yabridge
|
|
|
|
tar -caf "$ARCHIVE_NAME" yabridge
|
|
rm -rf yabridge
|
|
- uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./${{ env.ARCHIVE_NAME }}
|
|
asset_name: ${{ env.ARCHIVE_NAME }}
|
|
asset_content_type: application/x-compressed-tar
|