Skip to content

Commit 0b6fc3d

Browse files
ElectricalBoyOcraftyone
andauthoredJul 1, 2024
CI: Build with ubuntu-24.04 (SoftFever#5919)
* CI: Build with ubuntu-24.04 * Use apt-get in ubuntu-24.04 * Fix step name * Use alternate approach for detecting libwebkit2gtk version * CI: Install libfuse2 in ubuntu-24.04 * Reduce repetitive code in workflows Co-authored-by: Ocraftyone <Ocraftyone@users.noreply.github.com> * CI: Install libfuse2 Runtime dependency for AppImage * Fix filenames for nightly deployment * Properly nest conditional --------- Co-authored-by: Ocraftyone <Ocraftyone@users.noreply.github.com>
1 parent a0dae39 commit 0b6fc3d

File tree

4 files changed

+44
-23
lines changed

4 files changed

+44
-23
lines changed
 

‎.github/workflows/build_all.yml

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
matrix:
4949
include:
5050
- os: ubuntu-20.04
51+
- os: ubuntu-24.04
5152
- os: windows-latest
5253
- os: macos-14
5354
arch: x86_64

‎.github/workflows/build_deps.yml

+17-7
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,24 @@ jobs:
8282
brew install zstd
8383
8484
85-
- name: Build on Ubuntu
86-
if: inputs.os == 'ubuntu-20.04'
85+
- name: Install Ubuntu Build Dependencies
86+
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
8787
working-directory: ${{ github.workspace }}
88+
env:
89+
apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }}
90+
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
8891
run: |
89-
sudo apt-get update
90-
sudo apt-get install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
92+
${{ env.apt-cmd }} update
93+
${{ env.apt-cmd }} install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
9194
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
92-
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-4.0-dev \
95+
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-${{ env.webkit-ver }}-dev \
9396
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
9497
gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo
98+
99+
- name: Build on Ubuntu
100+
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
101+
working-directory: ${{ github.workspace }}
102+
run: |
95103
mkdir -p ${{ github.workspace }}/deps/build
96104
mkdir -p ${{ github.workspace }}/deps/build/destdir
97105
sudo ./BuildLinux.sh -ur
@@ -117,10 +125,12 @@ jobs:
117125
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
118126

119127
- name: Upload Ubuntu artifacts
120-
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' }}
128+
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
129+
env:
130+
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
121131
uses: actions/upload-artifact@v4
122132
with:
123-
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
133+
name: OrcaSlicer_dep_ubuntu_${{ env.ubuntu-ver }}_${{ env.date }}
124134
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
125135

126136
build_orca:

‎.github/workflows/build_orca.yml

+25-14
Original file line numberDiff line numberDiff line change
@@ -221,32 +221,38 @@ jobs:
221221

222222
# Ubuntu
223223
- name: Install dependencies
224-
if: inputs.os == 'ubuntu-20.04'
224+
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
225+
env:
226+
apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }}
227+
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
228+
libfuse2-pkg: ${{ (inputs.os == 'ubuntu-20.04' && 'libfuse2') || (inputs.os == 'ubuntu-24.04' && 'libfuse2t64') || '' }}
225229
run: |
226-
sudo apt-get update
227-
sudo apt-get install -y autoconf build-essential cmake curl eglexternalplatform-dev \
230+
${{ env.apt-cmd }} update
231+
${{ env.apt-cmd }} install -y autoconf build-essential cmake curl eglexternalplatform-dev \
228232
extra-cmake-modules file git libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libglew-dev libglu1-mesa-dev \
229233
libglu1-mesa-dev libgstreamer1.0-dev libgstreamerd-3-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \
230234
libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
231-
libwebkit2gtk-4.0-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget
235+
libwebkit2gtk-${{ env.webkit-ver }}-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget ${{ env.libfuse2-pkg }}
232236
233237
- name: Install dependencies from BuildLinux.sh
234-
if: inputs.os == 'ubuntu-20.04'
238+
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
235239
shell: bash
236240
run: sudo ./BuildLinux.sh -ur
237241

238242
- name: Fix permissions
239-
if: inputs.os == 'ubuntu-20.04'
243+
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
240244
shell: bash
241245
run: sudo chown $USER -R ./
242246

243247
- name: Build slicer
244-
if: inputs.os == 'ubuntu-20.04'
248+
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
245249
shell: bash
250+
env:
251+
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
246252
run: |
247253
./BuildLinux.sh -isr
248-
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
249-
chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
254+
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
255+
chmod +x ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
250256
251257
- name: Build orca_custom_preset_tests
252258
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
@@ -258,19 +264,24 @@ jobs:
258264
zip -r orca_custom_preset_tests.zip user/
259265
260266
- name: Upload artifacts Ubuntu
261-
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' }}
267+
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
268+
env:
269+
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
270+
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
262271
uses: actions/upload-artifact@v4
263272
with:
264-
name: OrcaSlicer_Linux_${{ env.ver }}
265-
path: './build/OrcaSlicer_Linux_${{ env.ver }}.AppImage'
273+
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
274+
path: './build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'
266275

267276
- name: Deploy Ubuntu release
268-
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }}
277+
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
278+
env:
279+
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
269280
uses: WebFreak001/deploy-nightly@v3.1.0
270281
with:
271282
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
272283
release_id: 137995723
273-
asset_path: ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
284+
asset_path: ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
274285
asset_name: OrcaSlicer_Linux_${{ env.ver }}.AppImage
275286
asset_content_type: application/octet-stream
276287
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted

‎linux.d/debian

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ then
3939
fi
4040

4141
# check which version of libwebkit2gtk is available
42-
apt show --quiet libwebkit2gtk-4.0-dev >/dev/null 2>&1
43-
if [ "$?" == "0" ]
42+
if [ "$(apt show --quiet libwebkit2gtk-4.0-dev)" != "" ]
4443
then
4544
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev)
4645
else

0 commit comments

Comments
 (0)
Please sign in to comment.