Browse Source

Setup github actions

tags/v2.3.2
falkTX 2 months ago
parent
commit
60f522685c
3 changed files with 160 additions and 64 deletions
  1. +159
    -0
      .github/workflows/release.yml
  2. +1
    -1
      PawPaw
  3. +0
    -63
      build.sh

+ 159
- 0
.github/workflows/release.yml View File

@@ -0,0 +1,159 @@
name: plugins

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
BOOTSTRAP_VERSION: 1
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1

jobs:
# macOS native intel build
macos:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: cache-macos
- name: Set up dependencies
run: |
brew install cmake jq meson
- name: Bootstrap macOS intel
shell: bash
run: |
./bootstrap-carla.sh macos && ./.cleanup.sh macos
- name: Build macOS intel
shell: bash
run: |
./build-carla.sh macos ${PLUGINS_BASE} ${PLUGINS_CROSS} ${PLUGINS_DISTRHO_PORTS} && ./.cleanup.sh macos
- uses: actions/upload-artifact@v2
with:
name: macOS intel package
path: Carla/*.dmg

# macOS native universal build
macos_universal:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: cache-macos-universal
- name: Set up dependencies
run: |
brew install cmake jq meson
- name: Bootstrap macOS universal
shell: bash
run: |
./bootstrap-carla.sh macos-universal && ./.cleanup.sh macos-universal
- name: Build macOS universal
shell: bash
run: |
./build-carla.sh macos-universal ${PLUGINS_BASE} ${PLUGINS_CROSS} ${PLUGINS_DISTRHO_PORTS} && ./.cleanup.sh macos-universal
- uses: actions/upload-artifact@v2
with:
name: macOS universal package
path: Carla/*.dmg

# linux with win32 cross-compilation
win32:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/debs
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: cache-win32
- name: Restore debian packages cache
run: |
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
fi
- name: Set up dependencies
run: |
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - && \
sudo dpkg --add-architecture i386 && \
sudo apt-add-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' && \
sudo apt-get install -y build-essential curl cmake jq llvm mingw-w64 qttools5-dev-tools winehq-stable \
binutils-mingw-w64-i686 g++-mingw-w64-i686
- name: Cache debian packages
run: |
mkdir -p ~/PawPawBuilds/debs && \
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
- name: Bootstrap win32 cross-compiled
shell: bash
run: |
./bootstrap-carla.sh win32 && ./.cleanup.sh win32
- name: Build win32 cross-compiled
shell: bash
run: |
./build-carla.sh win32 ${PLUGINS_BASE} ${PLUGINS_CROSS} ${PLUGINS_DISTRHO_PORTS} && ./.cleanup.sh win32
- uses: actions/upload-artifact@v2
with:
name: win32 installer
path: Carla/*.zip

# linux with win64 cross-compilation
win64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/PawPawBuilds/builds
~/PawPawBuilds/debs
~/PawPawBuilds/downloads
~/PawPawBuilds/targets
key: cache-win64
- name: Restore debian packages cache
run: |
if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
fi
- name: Set up dependencies
run: |
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - && \
sudo dpkg --add-architecture i386 && \
sudo apt-add-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' && \
sudo apt-get update -qq && \
sudo apt-get install -y build-essential curl cmake jq llvm mingw-w64 qttools5-dev-tools winehq-stable \
binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64
- name: Cache debian packages
run: |
mkdir -p ~/PawPawBuilds/debs && \
sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
- name: Bootstrap win64 cross-compiled
shell: bash
run: |
./bootstrap-carla.sh win64 && ./.cleanup.sh win64
- name: Build win64 cross-compiled
shell: bash
run: |
./build-carla.sh win64 ${PLUGINS_BASE} ${PLUGINS_CROSS} ${PLUGINS_DISTRHO_PORTS} && ./.cleanup.sh win64
- uses: actions/upload-artifact@v2
with:
name: win64 installer
path: Carla/*.zip

+ 1
- 1
PawPaw

@@ -1 +1 @@
Subproject commit 05be6301ede7648c0d085d7fc5de562519bf8f0c
Subproject commit 7ea70bf4e35ecd6f082598d65d2d8666354b8b4d

+ 0
- 63
build.sh View File

@@ -13,69 +13,6 @@ if [ -z "${target}" ]; then
exit 1
fi

# ---------------------------------------------------------------------------------------------------------------------
# non-travis builds

if [ -z "${BOOTSTRAP_VERSION}" ]; then
BOOTSTRAP_VERSION=1
fi
if [ -z "${TRAVIS_BUILD_DIR}" ]; then
TRAVIS_BUILD_DIR="$(pwd)"
fi

# ---------------------------------------------------------------------------------------------------------------------
# check build step

PAWPAW_DIR="${HOME}/PawPawBuilds"
PAWPAW_BUILDDIR="${PAWPAW_DIR}/builds/${target}"

if [ -e ${PAWPAW_BUILDDIR}/.last-bootstrap-version ]; then
LAST_BOOTSTRAP_VERSION=$(cat ${PAWPAW_BUILDDIR}/.last-bootstrap-version)
else
LAST_BOOTSTRAP_VERSION=0
fi

if [ ${LAST_BOOTSTRAP_VERSION} -eq ${BOOTSTRAP_VERSION} ] && [ -e ${PAWPAW_BUILDDIR}/.last-build-version ]; then
LAST_BUILD_VERSION=$(cat ${PAWPAW_BUILDDIR}/.last-build-version)
else
LAST_BUILD_VERSION=0
fi

BUILD_VERSION=$((${LAST_BUILD_VERSION} + 1))

mkdir -p ${PAWPAW_BUILDDIR}
echo ${BOOTSTRAP_VERSION} > ${PAWPAW_BUILDDIR}/.last-bootstrap-version

if [ ${BUILD_VERSION} -le 4 ]; then
echo ${BUILD_VERSION} > ${PAWPAW_BUILDDIR}/.last-build-version
fi

echo "Carla-Releases build v${BUILD_VERSION}"

# ---------------------------------------------------------------------------------------------------------------------
# build dependencies according to version/step, caching files along the way

if [ ${BUILD_VERSION} -eq 1 ]; then
${TRAVIS_BUILD_DIR}/PawPaw/bootstrap-plugins.sh ${target}
${TRAVIS_BUILD_DIR}/PawPaw/.cleanup.sh ${target}
exit 0
fi

if [ ${BUILD_VERSION} -eq 2 ]; then
${TRAVIS_BUILD_DIR}/PawPaw/bootstrap-qt.sh ${target}
${TRAVIS_BUILD_DIR}/PawPaw/.cleanup.sh ${target}
exit 0
fi

if [ ${BUILD_VERSION} -eq 3 ]; then
${TRAVIS_BUILD_DIR}/PawPaw/bootstrap-carla.sh ${target}
${TRAVIS_BUILD_DIR}/PawPaw/.cleanup.sh ${target}
exit 0
fi

${TRAVIS_BUILD_DIR}/PawPaw/bootstrap-carla.sh ${target}
${TRAVIS_BUILD_DIR}/PawPaw/.cleanup.sh ${target}

# ---------------------------------------------------------------------------------------------------------------------
# import PawPaw environment



Loading…
Cancel
Save