Skip to content

Commit

Permalink
ci: github actions add ubuntu24 build
Browse files Browse the repository at this point in the history
  • Loading branch information
MackBambu committed Jun 13, 2024
1 parent e3c390e commit 7debd34
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-24.04
- os: windows-latest
- os: macos-13
arch: x86_64
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_bambu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,28 +225,28 @@ jobs:

# Ubuntu
- name: Install dependencies
if: inputs.os == 'ubuntu-20.04'
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
run: |
sudo apt-get update
sudo apt-get install -y autoconf build-essential cmake curl wget file git \
libgl1-mesa-dev libgtk-3-dev libxkbcommon-dev libunwind-dev libfuse2
- 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
run: |
./BuildLinux.sh -isr
mv -n ./build/BambuStudio_ubu64.AppImage ./build/Bambu_Studio_linux_${{ env.ver }}.AppImage
mv -n ./build/BambuStudio_ubu64.AppImage ./build/Bambu_Studio_${{inputs.os}}_${{ env.ver }}.AppImage
# - name: Build orca_custom_preset_tests
# if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
Expand All @@ -258,11 +258,11 @@ 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' }} || ${{ ! env.ACT && inputs.os == 'ubuntu-24.04' }}
uses: actions/upload-artifact@v4
with:
name: BambuStudio_Linux_${{ env.ver }}
path: './build/Bambu_Studio_linux_${{ env.ver }}.AppImage'
name: BambuStudio_${{inputs.os}}_${{ env.ver }}
path: './build/Bambu_Studio_${{inputs.os}}_${{ env.ver }}.AppImage'

# - name: Deploy Ubuntu release
# if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ jobs:
- name: Build on Ubuntu
if: inputs.os == 'ubuntu-20.04'
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}
run: |
sudo apt-get update
sudo apt-get install cmake libgl1-mesa-dev libgtk-3-dev libxkbcommon-dev libunwind-dev libfuse2 -y
sudo apt-get install libgl1-mesa-dev libgtk-3-dev libxkbcommon-dev libunwind-dev libfuse2 -y
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
sudo ./BuildLinux.sh -ur
sudo chown $USER -R ./
./BuildLinux.sh -dr
cd deps/build
tar -czvf BambuStudio_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
tar -czvf BambuStudio_dep_${{ inputs.os }}_$(date +"%Y%m%d").tar.gz destdir
# Upload Artifacts
Expand All @@ -120,11 +120,11 @@ jobs:
path: ${{ github.workspace }}/deps/build/BambuStudio_dep*.zip

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

build_Bambu:
name: Build BambuStudio
Expand Down
25 changes: 17 additions & 8 deletions BuildLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ then
mkdir build
fi

# Addtional Dev packages for BambuStudio
export REQUIRED_DEV_PACKAGES="libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules"
# libwebkit2gtk-4.1-dev ??
export DEV_PACKAGES_COUNT=$(echo ${REQUIRED_DEV_PACKAGES} | wc -w)
if [ $(dpkg --get-selections | grep -E "$(echo ${REQUIRED_DEV_PACKAGES} | tr ' ' '|')" | wc -l) -lt ${DEV_PACKAGES_COUNT} ]; then
sudo apt install -y ${REQUIRED_DEV_PACKAGES} git cmake wget file
fi

#FIXME: require root for -u option
if [[ -n "$UPDATE_LIB" ]]
then
Expand All @@ -114,12 +106,29 @@ then
if [[ $ubu_version == "Ubuntu 22.04"* ]]
then
apt install -y curl libssl-dev libcurl4-openssl-dev m4
elif [[ $ubu_version == "Ubuntu 24.04"* ]]
then
NEW_SOURCE="deb http://gb.archive.ubuntu.com/ubuntu jammy main"
if grep -qF -- "$NEW_SOURCE" /etc/apt/sources.list; then
echo "source exist: $NEW_SOURCE"
else
echo "$NEW_SOURCE" | sudo tee -a /etc/apt/sources.list > /dev/null
fi
apt update
fi
if [[ -n "$BUILD_DEBUG" ]]
then
echo -e "\nInstalling: libssl-dev libcurl4-openssl-dev\n"
apt install -y libssl-dev libcurl4-openssl-dev
fi

# Addtional Dev packages for BambuStudio
export REQUIRED_DEV_PACKAGES="libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules"
# libwebkit2gtk-4.1-dev ??
export DEV_PACKAGES_COUNT=$(echo ${REQUIRED_DEV_PACKAGES} | wc -w)
if [ $(dpkg --get-selections | grep -E "$(echo ${REQUIRED_DEV_PACKAGES} | tr ' ' '|')" | wc -l) -lt ${DEV_PACKAGES_COUNT} ]; then
sudo apt install -y ${REQUIRED_DEV_PACKAGES} git cmake wget file
fi
echo -e "done\n"
exit 0
fi
Expand Down

0 comments on commit 7debd34

Please sign in to comment.