Skip to content

Commit 877b604

Browse files
committed
add workflows
1 parent 45fd2ec commit 877b604

19 files changed

Lines changed: 795 additions & 672 deletions

.github/FUNDING.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ body:
55
- type: markdown
66
attributes:
77
value: |
8-
**Thank you for using Orca Slicer and wanting to report a bug.**
8+
**Thank you for using Creality Print and wanting to report a bug.**
99
1010
Please note that this is not the place to make feature requests or ask for help.
11-
For this, please use the [Feature request](https://github.com/SoftFever/OrcaSlicer/issues/new?assignees=&labels=&projects=&template=feature_request.yml) issue type or you can discuss your idea on our [Discord server](https://discord.gg/P4VE9UY9gJ) with others.
11+
For this, please use the [Feature request](https://github.com/CrealityOfficial/CrealityPrint/issues/new?template=bug_report.yml) issue type.
1212
1313
Before filing, please check if the issue already exists (either open or closed) by using the search bar on the issues page. If it does, comment there. Even if it's closed, we can reopen it based on your comment.
1414
- type: checkboxes
@@ -21,8 +21,8 @@ body:
2121
- type: input
2222
id: version
2323
attributes:
24-
label: OrcaSlicer Version
25-
description: Which version of Orca Slicer are you running? You can see the full version in `Help` -> `About Orca Slicer`.
24+
label: CrealityPrint Version
25+
description: Which version of Creality Print are you running? You can see the full version in `Help` -> `About Creality Print`.
2626
placeholder: e.g. 1.9.0
2727
validations:
2828
required: true
@@ -100,10 +100,10 @@ body:
100100
You can export the project file from the application menu in `File`->`Save project as...`, then zip it
101101
* A **log file** for crashes and similar issues.
102102
You can find your log file here:
103-
Windows: `%APPDATA%\OrcaSlicer\log` or usually `C:\Users\<your username>\AppData\Roaming\OrcaSlicer\log`
104-
MacOS: `$HOME/Library/Application Support/OrcaSlicer/log`
105-
Linux: `$HOME/.config/OrcaSlicer/log`
106-
If Orca Slicer still starts, you can also reach this directory from the application menu in `Help` -> `Show Configuration Folder`
103+
Windows: `%APPDATA%\Creality\Creality Print\6.0\log` or usually `C:\Users\<your username>\AppData\Roaming\Creality\Creality Print\6.0\log`
104+
MacOS: `$HOME/Library/Application Support/Creality/Creality Print/6.0/log`
105+
Linux: `$HOME/.config/Creality Print/log`
106+
If Creality Print still starts, you can also reach this directory from the application menu in `Help` -> `Show Configuration Folder`
107107
You can zip the log directory, or just select the newest logs when this issue happens, and zip them
108108
- type: textarea
109109
id: file_uploads

.github/workflows/build_all.yml

Lines changed: 8 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,29 @@ on:
66
- main
77
- master
88
- release/*
9+
- windows
910
paths:
1011
- 'deps/**'
1112
- 'src/**'
1213
- '**/CMakeLists.txt'
1314
- 'version.inc'
1415
- 'localization/**'
1516
- 'resources/**'
16-
- ".github/workflows/build_*.yml"
17+
- ".github/workflows/*.yml"
1718
- 'flatpak/**'
1819

1920
pull_request:
2021
branches:
2122
- main
23+
- master
2224
- release/*
25+
- windows
2326
paths:
2427
- 'deps/**'
2528
- 'src/**'
2629
- '**/CMakeLists.txt'
2730
- 'version.inc'
28-
- ".github/workflows/build_*.yml"
31+
- ".github/workflows/*.yml"
2932
- 'BuildLinux.sh'
3033
- 'build_release_vs2022.bat'
3134
- 'build_release_macos.sh'
@@ -51,75 +54,14 @@ jobs:
5154
matrix:
5255
include:
5356
# Deprecate appimage
54-
# - os: ubuntu-20.04
55-
# - os: ubuntu-24.04
5657
- os: windows-latest
57-
- os: macos-14
58+
# - os: ubuntu-22.04
59+
# - os: ubuntu-24.04
5860
arch: arm64
5961
uses: ./.github/workflows/build_check_cache.yml
6062
with:
6163
os: ${{ matrix.os }}
6264
arch: ${{ matrix.arch }}
6365
build-deps-only: ${{ inputs.build-deps-only || false }}
6466
secrets: inherit
65-
flatpak:
66-
name: "Flatpak"
67-
container:
68-
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-46
69-
options: --privileged
70-
volumes:
71-
- /usr/local/lib/android:/usr/local/lib/android
72-
- /usr/share/dotnet:/usr/share/dotnet
73-
- /opt/ghc:/opt/ghc1
74-
- /usr/local/share/boost:/usr/local/share/boost1
75-
strategy:
76-
matrix:
77-
variant:
78-
- arch: x86_64
79-
runner: ubuntu-24.04
80-
- arch: aarch64
81-
runner: ubuntu-24.04-arm
82-
runs-on: ${{ matrix.variant.runner }}
83-
env:
84-
date:
85-
ver:
86-
ver_pure:
87-
steps:
88-
- name: "Remove unneeded stuff to free disk space"
89-
run:
90-
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*"
91-
- uses: actions/checkout@v4
92-
- name: Get the version and date
93-
run: |
94-
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
95-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
96-
ver="PR-${{ github.event.number }}"
97-
else
98-
ver=V$ver_pure
99-
fi
100-
echo "ver=$ver" >> $GITHUB_ENV
101-
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
102-
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
103-
shell: bash
104-
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
105-
with:
106-
bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
107-
manifest-path: flatpak/io.github.softfever.OrcaSlicer.yml
108-
cache: true
109-
arch: ${{ matrix.variant.arch }}
110-
upload-artifact: false
111-
- name: Upload artifacts Flatpak
112-
uses: actions/upload-artifact@v4
113-
with:
114-
name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
115-
path: '/__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak'
116-
- name: Deploy Flatpak to nightly release
117-
if: ${{github.ref == 'refs/heads/main'}}
118-
uses: WebFreak001/deploy-nightly@v3.2.0
119-
with:
120-
upload_url: https://uploads.github.com/repos/CrealityOfficial/CrealityPrint/releases/168648306/assets{?name,label}
121-
release_id: 168648306
122-
asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
123-
asset_name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
124-
asset_content_type: application/octet-stream
125-
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
67+
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
cache-key:
5+
required: true
6+
type: string
7+
cache-path:
8+
required: true
9+
type: string
10+
os:
11+
required: true
12+
type: string
13+
arch:
14+
required: false
15+
type: string
16+
17+
jobs:
18+
build_orca:
19+
name: Build Creality Print
20+
runs-on: ${{ inputs.os }}
21+
env:
22+
date:
23+
ver:
24+
ver_pure:
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
lfs: 'true'
31+
32+
- name: load cached deps
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ inputs.cache-path }}
36+
key: ${{ inputs.cache-key }}
37+
fail-on-cache-miss: true
38+
39+
- uses: lukka/get-cmake@latest
40+
with:
41+
cmakeVersion: "~3.28.0" # use most recent 3.28.x version
42+
43+
- name: Get the version and date on Windows
44+
if: inputs.os == 'windows-latest'
45+
run: |
46+
$date = Get-Date -Format 'yyyyMMdd'
47+
$ref = "${{ github.ref }}"
48+
$eventName = "${{ github.event_name }}"
49+
$prNumber = "${{ github.event.number }}"
50+
51+
if ($eventName -eq 'pull_request') {
52+
$ver = "PR" + $prNumber
53+
} else {
54+
$versionContent = Get-Content version.inc -Raw
55+
if ($versionContent -match 'set\(SoftFever_VERSION "(.*?)"\)') {
56+
$ver = $matches[1]
57+
}
58+
$ver = "V$ver"
59+
}
60+
61+
echo "ver=$ver" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
62+
echo "date=$date" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
63+
echo "date: ${{ env.date }} version: ${{ env.ver }}"
64+
shell: pwsh
65+
66+
# Windows
67+
- name: setup MSVC
68+
if: inputs.os == 'windows-latest'
69+
uses: microsoft/setup-msbuild@v2
70+
71+
- name: Install nsis
72+
if: inputs.os == 'windows-latest'
73+
run: |
74+
dir "C:/Program Files (x86)/Windows Kits/10/Include"
75+
choco install nsis
76+
77+
- name: Download tools
78+
if: inputs.os == 'windows-latest'
79+
working-directory: ${{ github.workspace }}
80+
run: |
81+
cd package
82+
cd runtime
83+
curl -LJO https://github.com/CrealityOfficial/CrealityPrint/releases/download/tools/MicrosoftEdgeWebView2RuntimeInstallerX64.exe
84+
85+
- name: Build slicer Win
86+
if: inputs.os == 'windows-latest'
87+
working-directory: ${{ github.workspace }}
88+
env:
89+
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
90+
WindowsSDKVersion: '10.0.22000.0\'
91+
run: .\test_build.bat slicer
92+
93+
# - name: Create installer Win
94+
# if: inputs.os == 'windows-latest'
95+
# working-directory: ${{ github.workspace }}/build
96+
# run: |
97+
# cpack -G NSIS
98+
99+
# - name: Pack app
100+
# if: inputs.os == 'windows-latest'
101+
# working-directory: ${{ github.workspace }}/build
102+
# shell: cmd
103+
# run: '"C:/Program Files/7-Zip/7z.exe" a -tzip OrcaSlicer_Windows_${{ env.ver }}_portable.zip ${{ github.workspace }}/build/OrcaSlicer'
104+
105+
# - name: Pack PDB
106+
# if: inputs.os == 'windows-latest'
107+
# working-directory: ${{ github.workspace }}/build/src/Release
108+
# shell: cmd
109+
# run: '"C:/Program Files/7-Zip/7z.exe" a -m0=lzma2 -mx9 Debug_PDB_${{ env.ver }}_for_developers_only.7z *.pdb'
110+

.github/workflows/build_deps.yml

Lines changed: 6 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
build_deps:
2525
name: Build Deps
2626
if: inputs.build-deps-only || inputs.valid-cache != true
27+
# if: true
2728
runs-on: ${{ inputs.os }}
2829
env:
2930
date:
@@ -45,103 +46,21 @@ jobs:
4546
with:
4647
cmakeVersion: "~3.28.0" # use most recent 3.28.x version
4748

48-
- name: setup dev on Windows
49-
if: inputs.os == 'windows-latest'
50-
uses: microsoft/setup-msbuild@v2
51-
52-
- name: Get the date on Ubuntu and macOS
53-
if: inputs.os != 'windows-latest'
54-
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
55-
shell: bash
56-
57-
- name: Get the date on Windows
58-
if: inputs.os == 'windows-latest'
59-
run: echo "date=$(Get-Date -Format 'yyyyMMdd')" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
60-
shell: pwsh
61-
62-
6349
# Build Dependencies
6450
- name: Build on Windows
6551
if: inputs.os == 'windows-latest'
6652
working-directory: ${{ github.workspace }}
6753
run: |
6854
choco install strawberryperl
69-
.\build_release_vs2022.bat deps
70-
.\build_release_vs2022.bat pack
55+
.\test_build.bat deps
56+
.\test_build.bat pack
7157
cd ${{ github.workspace }}/deps/build
7258
73-
- name: Build on Mac ${{ inputs.arch }}
74-
if: inputs.os == 'macos-14'
75-
working-directory: ${{ github.workspace }}
76-
run: |
77-
brew install automake texinfo libtool
78-
brew list
79-
brew uninstall --ignore-dependencies zstd
80-
chmod +x ./build_release_macos.sh
81-
./build_release_macos.sh -dx -a universal -t 10.15 -1
82-
for arch in arm64 x86_64; do
83-
(cd "${{ github.workspace }}/deps/build/${arch}" && \
84-
find . -mindepth 1 -maxdepth 1 ! -name 'OrcaSlicer_dep' -exec rm -rf {} +)
85-
done
86-
brew install zstd
87-
88-
89-
- name: Install Ubuntu Build Dependencies
90-
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
91-
working-directory: ${{ github.workspace }}
92-
env:
93-
apt-cmd: ${{ (inputs.os == 'ubuntu-20.04' && 'apt-fast') || (inputs.os == 'ubuntu-24.04' && 'sudo apt-get') || '' }}
94-
webkit-ver: ${{ (inputs.os == 'ubuntu-20.04' && '4.0') || (inputs.os == 'ubuntu-24.04' && '4.1') || '' }}
95-
run: |
96-
${{ env.apt-cmd }} update
97-
${{ env.apt-cmd }} install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
98-
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
99-
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-${{ env.webkit-ver }}-dev \
100-
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
101-
gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo
102-
103-
- name: Build on Ubuntu
104-
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
105-
working-directory: ${{ github.workspace }}
106-
run: |
107-
mkdir -p ${{ github.workspace }}/deps/build
108-
mkdir -p ${{ github.workspace }}/deps/build/destdir
109-
sudo ./BuildLinux.sh -ur
110-
sudo chown $USER -R ./
111-
./BuildLinux.sh -dr
112-
cd deps/build
113-
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
114-
115-
116-
# Upload Artifacts
117-
# - name: Upload Mac ${{ inputs.arch }} artifacts
118-
# if: inputs.os == 'macos-14'
119-
# uses: actions/upload-artifact@v4
120-
# with:
121-
# name: OrcaSlicer_dep_mac_${{ env.date }}
122-
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.tar.gz
123-
124-
- name: Upload Windows artifacts
125-
if: inputs.os == 'windows-latest'
126-
uses: actions/upload-artifact@v4
127-
with:
128-
name: OrcaSlicer_dep_win64_${{ env.date }}
129-
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.zip
130-
131-
- name: Upload Ubuntu artifacts
132-
if: ${{ ! env.ACT && inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04' }}
133-
env:
134-
ubuntu-ver: ${{ (inputs.os == 'ubuntu-20.04' && '2004') || (inputs.os == 'ubuntu-24.04' && '2404') || '' }}
135-
uses: actions/upload-artifact@v4
136-
with:
137-
name: OrcaSlicer_dep_ubuntu_${{ env.ubuntu-ver }}_${{ env.date }}
138-
path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep_ubuntu_*.tar.gz
139-
140-
build_orca:
141-
name: Build OrcaSlicer
59+
build_creality_print:
60+
name: Build Creality Print
14261
needs: [build_deps]
14362
if: ${{ !cancelled() && !inputs.build-deps-only && (inputs.valid-cache == true && needs.build_deps.result == 'skipped') || (inputs.valid-cache != true && success()) }}
144-
uses: ./.github/workflows/build_orca.yml
63+
uses: ./.github/workflows/build_creality_print.yml
14564
with:
14665
cache-key: ${{ inputs.cache-key }}
14766
cache-path: ${{ inputs.cache-path }}

0 commit comments

Comments
 (0)