Skip to content

Commit

Permalink
CI: Build with ubuntu-24.04 (#5919)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ElectricalBoy and Ocraftyone committed Jul 1, 2024
1 parent a0dae39 commit 0b6fc3d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-24.04
- os: windows-latest
- os: macos-14
arch: x86_64
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,24 @@ jobs:
brew install zstd
- name: Build on Ubuntu
if: inputs.os == 'ubuntu-20.04'
- name: Install Ubuntu Build Dependencies
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}
env:
apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }}
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
run: |
sudo apt-get update
sudo apt-get install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
${{ env.apt-cmd }} update
${{ env.apt-cmd }} install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-4.0-dev \
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-${{ env.webkit-ver }}-dev \
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo
- name: Build on Ubuntu
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}
run: |
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
sudo ./BuildLinux.sh -ur
Expand All @@ -117,10 +125,12 @@ jobs:
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip

- name: Upload Ubuntu artifacts
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' }}
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
env:
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_ubuntu_${{ env.date }}
name: OrcaSlicer_dep_ubuntu_${{ env.ubuntu-ver }}_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz

build_orca:
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/build_orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,32 +221,38 @@ jobs:

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

- name: Fix permissions
if: inputs.os == 'ubuntu-20.04'
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
run: sudo chown $USER -R ./

- name: Build slicer
if: inputs.os == 'ubuntu-20.04'
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
run: |
./BuildLinux.sh -isr
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
chmod +x ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
- name: Build orca_custom_preset_tests
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
Expand All @@ -258,19 +264,24 @@ jobs:
zip -r orca_custom_preset_tests.zip user/
- name: Upload artifacts Ubuntu
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' }}
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
env:
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_Linux_${{ env.ver }}
path: './build/OrcaSlicer_Linux_${{ env.ver }}.AppImage'
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
path: './build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'

- name: Deploy Ubuntu release
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }}
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && (inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04') }}
env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
uses: WebFreak001/deploy-nightly@v3.1.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
asset_path: ./build/OrcaSlicer_Linux${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
asset_name: OrcaSlicer_Linux_${{ env.ver }}.AppImage
asset_content_type: application/octet-stream
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
Expand Down
3 changes: 1 addition & 2 deletions linux.d/debian
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ then
fi

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

0 comments on commit 0b6fc3d

Please sign in to comment.