Arm64 version of orcaslicer #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Cache Dependencies | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow on push to the main branch | |
pull_request: | |
branches: | |
- main # Trigger the workflow on pull requests to the main branch | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 # or adjust to your environment | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Set up CMake and Ninja (if necessary) | |
- name: Set up CMake | |
uses: lukka/get-cmake@latest | |
with: | |
useCloudCache: true | |
useLocalCache: false | |
cmake_version: "~3.28.0" | |
ninja_version: "latest" | |
# Step 3: Remove any old cache (if necessary) | |
- name: Remove old cache (if exists) | |
run: | | |
rm -rf /home/runner/work/OrcaSlicer/OrcaSlicer/deps/build/ | |
# Step 4: Create the deps folder if it doesn't exist | |
- name: Create deps folder | |
run: | | |
mkdir -p /home/runner/work/OrcaSlicer/OrcaSlicer/deps/build | |
# Step 5: Build dependencies and store them in the deps folder | |
- name: Build Dependencies | |
run: | | |
cd /home/runner/work/OrcaSlicer/OrcaSlicer | |
cmake -S . -B deps/build | |
cmake --build deps/build | |
# Ensure the build output is placed into the deps folder for caching | |
# Step 6: Cache the dependencies with a new key | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /home/runner/work/OrcaSlicer/OrcaSlicer/deps/build/ | |
key: ubuntu-24.04-arm-x86_64-cache-orcaslicer_deps-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ github.sha }} # New cache key with hash and commit | |
restore-keys: | | |
ubuntu-24.04-arm-x86_64-cache-orcaslicer_deps-build- | |
# Step 7: Build the main project | |
- name: Build the main project | |
run: | | |
cd /home/runner/work/OrcaSlicer/OrcaSlicer | |
cmake --build . # Replace with your actual build commands | |
# Step 8: Additional steps as needed (e.g., testing, deployment, etc.) |