Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 version of orcaslicer #8418

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
179535e
Update build_all.yml
CodeMasterCody3D Feb 13, 2025
377b25c
Update build_all.yml
CodeMasterCody3D Feb 13, 2025
f99064c
Update build_all.yml
CodeMasterCody3D Feb 13, 2025
0d8d5f6
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
616385f
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
0447e7c
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
a050361
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
12d3e79
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
aed4999
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
2514523
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
fb73892
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
9ac86cd
Update build_all.yml
CodeMasterCody3D Feb 14, 2025
83c349a
Update build_appimage.sh.in
CodeMasterCody3D Feb 14, 2025
1d16a7f
Update build_appimage.sh.in
CodeMasterCody3D Feb 15, 2025
be504ba
Update build_all.yml
CodeMasterCody3D Feb 15, 2025
efb886b
Update build_all.yml
CodeMasterCody3D Feb 15, 2025
a63babf
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
0fdebd9
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
8b4ea9c
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
6f50fc4
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
40dd832
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
d7bea64
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
42d2708
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
a7827bc
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
c5490d8
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
3af0cb8
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
c5e24c2
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
1d7b85e
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
9658ff0
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
ff8f91c
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
2ff8798
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
739812a
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
75c803e
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
751fb9c
Create Build_deps_arm64_ubuntu.yml
CodeMasterCody3D Feb 17, 2025
bc568b0
Update Build_deps_arm64_ubuntu.yml
CodeMasterCody3D Feb 17, 2025
3e3f536
Update Build_deps_arm64_ubuntu.yml
CodeMasterCody3D Feb 17, 2025
e5ff29c
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
db4df5c
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
5175d45
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
a7b73bd
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
ba6ab8e
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
7af3e29
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
488deb1
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
d8a1a49
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
5736d84
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
603ee69
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
3e35bdc
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
72a4e11
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
dea7c44
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
685ce10
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
e104297
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
a9daecf
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
af9d204
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
459a404
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
f25e5d9
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
75b6007
Update build_all.yml
CodeMasterCody3D Feb 17, 2025
e2d6d9a
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
b3bbdfd
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
045869b
Update build_check_cache.yml
CodeMasterCody3D Feb 17, 2025
770f800
Update build_deps.yml
CodeMasterCody3D Feb 17, 2025
e294ea2
Merge branch 'main' into main
SoftFever Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/Build_deps_arm64_ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build ARM64 Dependencies
on:
workflow_dispatch:
inputs:
cache-key:
description: 'Cache key for dependencies'
required: true
default: 'arm64-deps-v1'
type: string
cache-path:
description: 'Path to cache dependencies'
required: true
default: 'deps/build'
type: string
os:
description: 'Operating system'
required: true
default: 'ubuntu-24.04-arm'
type: string
workflow_call:
inputs:
cache-key:
required: true
type: string
cache-path:
required: true
type: string
os:
required: true
type: string

jobs:
build_deps:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
lfs: 'true'

- name: load cached deps
uses: actions/cache@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0"

- name: Get the date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
shell: bash

- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get 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.1-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 Dependencies
working-directory: ${{ github.workspace }}
run: |
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 OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir

- name: Upload Ubuntu artifacts
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_ubuntu_2404_${{ env.date }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz

96 changes: 74 additions & 22 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ name: Build all
on:
push:
branches:
- main
- release/*
- main
- release/*
paths:
- 'deps/**'
- 'src/**'
- '**/CMakeLists.txt'
- 'version.inc'
- 'localization/**'
- 'resources/**'
- ".github/workflows/build_*.yml"
- 'deps/**'
- 'src/**'
- '**/CMakeLists.txt'
- 'version.inc'
- 'localization/**'
- 'resources/**'
- ".github/workflows/build_*.yml"

pull_request:
branches:
- main
- release/*
- main
- release/*
paths:
- 'deps/**'
- 'src/**'
- '**/CMakeLists.txt'
- 'version.inc'
- ".github/workflows/build_*.yml"
- 'BuildLinux.sh'
- 'build_release_vs2022.bat'
- 'build_release_macos.sh'

workflow_dispatch: # allows for manual dispatch
- 'deps/**'
- 'src/**'
- '**/CMakeLists.txt'
- 'version.inc'
- ".github/workflows/build_*.yml"
- 'BuildLinux.sh'
- 'build_release_vs2022.bat'
- 'build_release_macos.sh'

workflow_dispatch:
Copy link
Collaborator

@Noisyfox Noisyfox Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you ran a code formatter against these files which does not preserve comments.
Generally speaking, try avoid doing unnecessary changes to the file, especially formatting the entire file. It's usually acceptable if you only reformat the part that you changed (with that said, still it's better to follow the code style of the rest of the part if possible). Otherwise the PR will be hard to review with all these unrelated destractions, and also this could create unnecessary conflicts to others.

inputs:
build-deps-only:
description: 'Only build dependencies (bypasses caching)'
Expand All @@ -38,7 +38,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
build_all:
Expand All @@ -48,8 +47,13 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
arch: x86_64
- os: ubuntu-24.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodeMasterCody3D what is the reason for removing 24.04 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was failing and just switched to 22.04 instead. I didn't dig further just decided to use what I had figured out so I could get this code to you guys that are way smarter than me. I basically found out about arm runners And decided to give it a shot. I am not a programmer And I used ChatGPT to do lots of modifying and testing them i decided to try this myself and it was an easy modification getting the arm runner to work but I used ChatGPT to do the modification for me. I am a super noob. I was just determined to get arm64 version of orcaslicer built using the runners so it would be in the upstream. Sorry for the lengthy explanation. You can add it back I just didn't wanna deal with it

I forgot to mention I had to add this to it as well to make the build work.

sudo apt-get -y update
sudo apt-get remove -y libunwind-*
sudo apt-get -y install --no-install-recommends libgstreamer1.0-dev

arch: x86_64
- os: ubuntu-24.04-arm
arch: arm64
- os: windows-latest
arch: x86_64
- os: macos-14
arch: x86_64
- os: macos-14
Expand All @@ -60,51 +64,99 @@ jobs:
arch: ${{ matrix.arch }}
build-deps-only: ${{ inputs.build-deps-only || false }}
secrets: inherit

flatpak:

name: "Flatpak"

runs-on: ubuntu-latest

env:

date:

ver:

ver_pure:

container:

image: bilelmoussaoui/flatpak-github-actions:gnome-46

options: --privileged

volumes:

- /usr/local/lib/android:/usr/local/lib/android

- /usr/share/dotnet:/usr/share/dotnet

- /opt/ghc:/opt/ghc1

- /usr/local/share/boost:/usr/local/share/boost1

steps:

- name: "Remove unneeded stuff to free disk space"

run:

rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"

- uses: actions/checkout@v4

- name: Get the version and date

run: |

ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)

if [[ "${{ github.event_name }}" == "pull_request" ]]; then

ver="PR-${{ github.event.number }}"

else

ver=V$ver_pure

fi

echo "ver=$ver" >> $GITHUB_ENV

echo "ver_pure=$ver_pure" >> $GITHUB_ENV

echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV

shell: bash

- uses: flatpak/flatpak-github-actions/flatpak-builder@master

with:

bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak

manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml

cache: true

upload-artifact: false

- name: Deploy Flatpak to nightly release

if: ${{github.ref == 'refs/heads/main'}}

uses: WebFreak001/[email protected]

with:

upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}

release_id: 137995723

asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak

asset_name: OrcaSlicer-Linux-flatpak_${{ env.ver }}.flatpak

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
13 changes: 7 additions & 6 deletions .github/workflows/build_check_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
build-deps-only:
required: false
type: boolean

jobs:
check_cache: # determines if there is a cache and outputs variables used in caching process
check_cache:
name: Check Cache
runs-on: ${{ inputs.os }}
outputs:
Expand All @@ -30,9 +30,9 @@ jobs:
- name: set outputs
id: set_outputs
env:
underscore-arch: ${{ inputs.os == 'macos-14' && '_' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing
dash-arch: ${{ inputs.os == 'macos-14' && '-' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing
dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-14') && 'OrcaSlicer_dep' || 'destdir' }}
underscore-arch: ${{ (contains(inputs.os, 'ubuntu') || inputs.os == 'macos-14') && '_' || ''}}${{ (contains(inputs.os, 'ubuntu') || inputs.os == 'macos-14') && inputs.arch || '' }}
dash-arch: ${{ (contains(inputs.os, 'ubuntu') || inputs.os == 'macos-14') && '-' || ''}}${{ (contains(inputs.os, 'ubuntu') || inputs.os == 'macos-14') && inputs.arch || '' }}
dep-folder-name: ${{ (inputs.os == 'windows-latest' || contains(inputs.os, 'macos')) && 'OrcaSlicer_dep' || 'destdir' }}
output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
run: |
echo cache-key=${{ inputs.os }}${{ env.dash-arch }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
Expand All @@ -46,7 +46,7 @@ jobs:
key: ${{ steps.set_outputs.outputs.cache-key }}
lookup-only: true

build_deps: # call next step
build_deps:
name: Build Deps
needs: [check_cache]
uses: ./.github/workflows/build_deps.yml
Expand All @@ -58,3 +58,4 @@ jobs:
arch: ${{ inputs.arch }}
build-deps-only: ${{ inputs.build-deps-only }}
secrets: inherit

25 changes: 11 additions & 14 deletions .github/workflows/build_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
env:
date:
steps:

# Setup the environment
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -39,11 +37,13 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
key: ${{ inputs.os }}${{ inputs.arch }}-cache-orcaslicer_deps-build-${{ github.sha }}
restore-keys: |
${{ inputs.os }}${{ inputs.arch }}-cache-orcaslicer_deps-build-

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0" # use most recent 3.28.x version
cmakeVersion: "~3.28.0"

- name: setup dev on Windows
if: inputs.os == 'windows-latest'
Expand All @@ -59,8 +59,6 @@ jobs:
run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
shell: pwsh


# Build Dependencies
- name: Build on Windows
if: inputs.os == 'windows-latest'
working-directory: ${{ github.workspace }}
Expand All @@ -82,7 +80,6 @@ jobs:
./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15 -1
brew install zstd


- name: Install Ubuntu Build Dependencies
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}
Expand All @@ -109,30 +106,29 @@ jobs:
cd deps/build
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir


# Upload Artifacts
- name: Upload Mac ${{ inputs.arch }} artifacts
if: inputs.os == 'macos-14'
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }}
name: ${{ inputs.os }}-${{ inputs.arch }}-cache-orcaslicer_deps-build-${{ github.sha }}
path: ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep*.tar.gz
overwrite: false

- name: Upload Windows artifacts
if: inputs.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_win64_${{ env.date }}
name: ${{ inputs.os }}-cache-orcaslicer_deps-build-${{ github.sha }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
overwrite: false

- name: Upload Ubuntu artifacts
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.ubuntu-ver }}_${{ env.date }}
name: ${{ inputs.os }}-${{ inputs.arch }}-cache-orcaslicer_deps-build-${{ github.sha }}
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
overwrite: false

build_orca:
name: Build OrcaSlicer
Expand All @@ -145,3 +141,4 @@ jobs:
os: ${{ inputs.os }}
arch: ${{ inputs.arch }}
secrets: inherit

Loading