AU processing details, still WIP
[carla.git] / .github / workflows / release.yml
blobe283686ad312a322226f8ed18b24eb0d2967182f
1 name: release
3 on: [push, pull_request]
5 env:
6   CACHE_VERSION: 1
7   DEBIAN_FRONTEND: noninteractive
8   HOMEBREW_NO_AUTO_UPDATE: 1
9   HOMEBREW_NO_INSTALL_CLEANUP: 1
10   PAWPAW_SKIP_LTO: 1
11   PAWPAW_SKIP_TESTS: 1
12   PAWPAW_VERSION: 9534e2b4f9bafc993e05fada89b824f3a2176708
14 jobs:
15   # macOS native universal build
16   macos_universal:
17     runs-on: macos-11
18     steps:
19       - uses: actions/checkout@v4
20         with:
21           submodules: recursive
22       - name: Set up cache
23         uses: actions/cache@v4
24         with:
25           path: |
26             ~/PawPawBuilds
27           key: macos-universal-v${{ env.CACHE_VERSION }}
28       - name: Set up dependencies
29         run: |
30           brew install cmake jq meson
31       - name: Bootstrap macOS universal
32         shell: bash
33         run: |
34           git clone https://github.com/DISTRHO/PawPaw.git
35           git -C PawPaw checkout ${{ env.PAWPAW_VERSION }}
36           ./PawPaw/.github/workflows/bootstrap-deps.sh macos-universal
37           ./PawPaw/bootstrap-carla.sh macos-universal && ./PawPaw/.cleanup.sh macos-universal
38       - name: Build macOS universal
39         shell: bash
40         run: |
41           source PawPaw/local.env macos-universal
42           make features
43           make EXTERNAL_PLUGINS=false NOOPT=true ${MAKE_ARGS}
44           make dist ${MAKE_ARGS} TESTING=true -j 1
45           make dist ${MAKE_ARGS} TESTING=true -j 1
46           make dist ${MAKE_ARGS} TESTING=true -j 1
47           make dist ${MAKE_ARGS} TESTING=true -j 1
48           make dist ${MAKE_ARGS} -j 1
49       - uses: actions/upload-artifact@v4
50         with:
51           name: macOS dmg
52           path: ./*.dmg
53       - uses: softprops/action-gh-release@v1
54         if: startsWith(github.ref, 'refs/tags/')
55         with:
56           tag_name: ${{ github.ref_name }}
57           name: ${{ github.ref_name }}
58           draft: false
59           prerelease: false
60           files: |
61             ./*.dmg
63   # linux with win32 cross-compilation
64   win32:
65     runs-on: ubuntu-22.04
66     steps:
67       - uses: actions/checkout@v4
68         with:
69           submodules: recursive
70       - name: Set up cache
71         uses: actions/cache@v4
72         with:
73           path: |
74             ~/PawPawBuilds
75           key: win32-v${{ env.CACHE_VERSION }}
76       - name: Restore debian packages cache
77         run: |
78           if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
79             sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
80           fi
81       - name: Fix GitHub's mess
82         run: |
83           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
84           sudo dpkg --add-architecture i386
85           sudo apt-get update -qq
86           sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386
87       - name: Set up dependencies
88         run: |
89           sudo apt-get install -y build-essential curl cmake jq meson mingw-w64 gperf qttools5-dev qttools5-dev-tools xvfb \
90             binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable
91       - name: Cache debian packages
92         run: |
93           mkdir -p ~/PawPawBuilds/debs
94           sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
95       - name: Bootstrap win32 cross-compiled
96         shell: bash
97         run: |
98           git clone https://github.com/DISTRHO/PawPaw.git
99           git -C PawPaw checkout ${{ env.PAWPAW_VERSION }}
100           ./PawPaw/.github/workflows/bootstrap-deps.sh win32
101           ./PawPaw/bootstrap-carla.sh win32 && ./PawPaw/.cleanup.sh win32
102       - name: Build win32 cross-compiled
103         shell: bash
104         run: |
105           source PawPaw/local.env win32
106           make features
107           make EXTERNAL_PLUGINS=false NOOPT=true ${MAKE_ARGS}
108           make dist ${MAKE_ARGS} TESTING=true -j 1
109           make dist ${MAKE_ARGS} TESTING=true -j 1
110           make dist ${MAKE_ARGS} TESTING=true -j 1
111           make dist ${MAKE_ARGS} TESTING=true -j 1
112           make dist ${MAKE_ARGS} -j 1
113       - uses: actions/upload-artifact@v4
114         with:
115           name: win32 zip
116           path: ./*.zip
117       - uses: softprops/action-gh-release@v1
118         if: startsWith(github.ref, 'refs/tags/')
119         with:
120           tag_name: ${{ github.ref_name }}
121           name: ${{ github.ref_name }}
122           draft: false
123           prerelease: false
124           files: |
125             ./*.zip
127   # linux with win64 cross-compilation
128   win64:
129     runs-on: ubuntu-22.04
130     steps:
131       - uses: actions/checkout@v4
132         with:
133           submodules: recursive
134       - name: Set up cache
135         uses: actions/cache@v4
136         with:
137           path: |
138             ~/PawPawBuilds
139           key: win64-v${{ env.CACHE_VERSION }}
140       - name: Restore debian packages cache
141         run: |
142           if [ -d ~/PawPawBuilds/debs ] && [ "$(ls ~/PawPawBuilds/debs | wc -l)" -ne 0 ]; then \
143             sudo cp ~/PawPawBuilds/debs/*.deb /var/cache/apt/archives/; \
144           fi
145       - name: Fix GitHub's mess
146         run: |
147           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
148           sudo dpkg --add-architecture i386
149           sudo apt-get update -qq
150           sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386
151       - name: Set up dependencies
152         run: |
153           sudo apt-get install -y build-essential curl cmake jq meson mingw-w64 gperf qttools5-dev qttools5-dev-tools xvfb \
154             binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
155       - name: Cache debian packages
156         run: |
157           mkdir -p ~/PawPawBuilds/debs
158           sudo mv /var/cache/apt/archives/*.deb ~/PawPawBuilds/debs/
159       - name: Bootstrap win64 cross-compiled
160         shell: bash
161         run: |
162           git clone https://github.com/DISTRHO/PawPaw.git
163           git -C PawPaw checkout ${{ env.PAWPAW_VERSION }}
164           ./PawPaw/.github/workflows/bootstrap-deps.sh win64
165           ./PawPaw/bootstrap-carla.sh win64 && ./PawPaw/.cleanup.sh win64
166       - name: Build win64 cross-compiled
167         shell: bash
168         run: |
169           source PawPaw/local.env win64
170           make features
171           make EXTERNAL_PLUGINS=false NOOPT=true ${MAKE_ARGS}
172           make EXTERNAL_PLUGINS=false NOOPT=true ${MAKE_ARGS} win32r
173           make dist ${MAKE_ARGS} TESTING=true -j 1
174           make dist ${MAKE_ARGS} TESTING=true -j 1
175           make dist ${MAKE_ARGS} TESTING=true -j 1
176           make dist ${MAKE_ARGS} TESTING=true -j 1
177           make dist ${MAKE_ARGS} -j 1
178       - uses: actions/upload-artifact@v4
179         with:
180           name: win64 zip
181           path: ./*.zip
182       - uses: softprops/action-gh-release@v1
183         if: startsWith(github.ref, 'refs/tags/')
184         with:
185           tag_name: ${{ github.ref_name }}
186           name: ${{ github.ref_name }}
187           draft: false
188           prerelease: false
189           files: |
190             ./*.zip