ci: github actions add ubuntu24 build
JIRA: STUDIO-6329 Change-Id: I499d21a1ae61ece2a753a71de621dc7e86fc921d
This commit is contained in:
parent
1acea099e7
commit
d30fb51b85
|
@ -44,6 +44,7 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-24.04
|
||||
- os: windows-latest
|
||||
- os: macos-13
|
||||
arch: x86_64
|
||||
|
|
|
@ -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'
|
||||
|
@ -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' || 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' }}
|
||||
|
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-13') && 'BambuStudio_dep' || 'destdir' }}
|
||||
output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
|
||||
run: |
|
||||
echo cache-key=${{ runner.os }}${{ env.dash-arch }}-cache-bambustudio_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
|
||||
echo cache-key=${{ inputs.os }}${{ env.dash-arch }}-cache-bambustudio_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
|
||||
echo cache-path=${{ github.workspace }}/deps/build${{ env.underscore-arch }}/${{ env.dep-folder-name }}${{ env.underscore-arch }} >> ${{ env.output-cmd }}
|
||||
|
||||
- name: load cache
|
||||
|
|
|
@ -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
|
||||
|
@ -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' || 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
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue