diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..559cfb4a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,156 @@ +name: build + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' +env: + DEBIAN_FRONTEND: noninteractive + HOMEBREW_NO_AUTO_UPDATE: 1 + PAWPAW_VERSION: 8c69660ab10b75cd7a488f41386dbcb4c8802c5a + +jobs: + # macOS native intel build + macos: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - 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: | + if [ ! -d PawPaw ]; then + git clone https://github.com/DISTRHO/PawPaw.git + git -C PawPaw checkout ${PAWPAW_VERSION} + fi + ./PawPaw/bootstrap-jack2.sh macos && ./PawPaw/.cleanup.sh macos + + # macOS native universal build + macos_universal: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - 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: Fix up Xcode + run: | + sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* + sudo xcode-select -s "/Applications/Xcode_12.3.app" + - name: Bootstrap macOS universal + shell: bash + run: | + if [ ! -d PawPaw ]; then + git clone https://github.com/DISTRHO/PawPaw.git + git -C PawPaw checkout ${PAWPAW_VERSION} + fi + ./PawPaw/bootstrap-jack2.sh macos-universal && ./PawPaw/.cleanup.sh macos-universal + + # linux with win32 cross-compilation + win32: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + uses: actions/cache@v2 + with: + path: | + ~/PawPawBuilds/builds + ~/PawPawBuilds/debs + ~/PawPawBuilds/downloads + ~/PawPawBuilds/targets + /var/cache/apt/archives + 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 autopoint build-essential curl cmake jq llvm mingw-w64 qttools5-dev-tools winehq-stable xvfb \ + 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: | + if [ ! -d PawPaw ]; then + git clone https://github.com/DISTRHO/PawPaw.git + git -C PawPaw checkout ${PAWPAW_VERSION} + fi + ./PawPaw/bootstrap-jack2.sh win32 && ./PawPaw/.cleanup.sh win32 + + # linux with win64 cross-compilation + win64: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up cache + uses: actions/cache@v2 + with: + path: | + ~/PawPawBuilds/builds + ~/PawPawBuilds/debs + ~/PawPawBuilds/downloads + ~/PawPawBuilds/targets + /var/cache/apt/archives + 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 install -y autopoint build-essential curl cmake jq llvm mingw-w64 qttools5-dev-tools winehq-stable xvfb \ + 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: | + if [ ! -d PawPaw ]; then + git clone https://github.com/DISTRHO/PawPaw.git + git -C PawPaw checkout ${PAWPAW_VERSION} + fi + ./PawPaw/bootstrap-jack2.sh win64 && ./PawPaw/.cleanup.sh win64