diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index bea8746c5..e91326282 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -44,6 +44,7 @@ jobs: matrix: include: - os: ubuntu-20.04 + - os: ubuntu-24.04 - os: windows-latest - os: macos-13 arch: x86_64 diff --git a/.github/workflows/build_bambu.yml b/.github/workflows/build_bambu.yml index 05c34df28..74cdae2ff 100644 --- a/.github/workflows/build_bambu.yml +++ b/.github/workflows/build_bambu.yml @@ -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' }} @@ -284,4 +284,4 @@ jobs: # asset_path: ${{ github.workspace }}/resources/profiles/orca_custom_preset_tests.zip # asset_name: orca_custom_preset_tests.zip # asset_content_type: application/octet-stream - # max_releases: 1 \ No newline at end of file + # max_releases: 1 diff --git a/.github/workflows/build_check_cache.yml b/.github/workflows/build_check_cache.yml index 4ac7783b1..3fbf635bf 100644 --- a/.github/workflows/build_check_cache.yml +++ b/.github/workflows/build_check_cache.yml @@ -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 diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index 4b6ee5865..d6f861d73 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -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 @@ -136,4 +136,4 @@ jobs: cache-path: ${{ inputs.cache-path }} os: ${{ inputs.os }} arch: ${{ inputs.arch }} - secrets: inherit \ No newline at end of file + secrets: inherit diff --git a/BuildLinux.sh b/BuildLinux.sh index 5be61155e..2496a2ac9 100755 --- a/BuildLinux.sh +++ b/BuildLinux.sh @@ -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