Skip to content

Commit

Permalink
Sync stable with master
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Sep 18, 2024
1 parent e245a73 commit 14109e8
Show file tree
Hide file tree
Showing 10 changed files with 359 additions and 27 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ on:
- opened
- synchronize
- labeled

jobs:
build_amd64:
runs-on: ubuntu-latest
if: |
github.event.pull_request.state == 'open' &&
(
(
github.event.action == 'labeled' &&
github.event.action == 'labeled' &&
github.event.label.name == 'safe to publish'
) ||
) ||
(
github.event.action != 'labeled' &&
github.event.action != 'labeled' &&
contains(github.event.pull_request.labels.*.name, 'safe to publish')
)
)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install snapcraft
run: |
sudo snap install snapcraft --classic
Expand All @@ -35,11 +35,11 @@ jobs:
mkdir -p ./pr-data
echo '${{ github.event.number }}' > ./pr-data/pr-number
echo '${{ github.event.pull_request.head.sha }}' > ./pr-data/pr-commit
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: snap
path: freecad*.snap
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pr-data
path: pr-data/
4 changes: 2 additions & 2 deletions .github/workflows/promote-to-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
schedule:
- cron: "0 4 * * 0" # Every Sunday at 4:00
workflow_dispatch: # or manually

jobs:
publish_amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install snapcraft
run: sudo snap install snapcraft --classic
- name: promote from edge to beta
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
schedule:
- cron: "0 0 * * *" # Every day at 0:00
workflow_dispatch: # or manually

jobs:
publish_amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install snapcraft
run: sudo snap install snapcraft --classic
- name: build snap
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
$ sudo snap install --channel=${snapChannel} freecad
# If you already have the freecad snap installed
$ sudo snap refresh --channel=${snapChannel} freecad
$ sudo snap refresh --channel=${snapChannel} freecad
# Experimental: Parallel install (see https://github.com/FreeCAD/FreeCAD-snap/blob/master/docs/index.md#parallel-installs)
$ sudo snap set system experimental.parallel-instances=true
Expand All @@ -130,4 +130,3 @@ jobs:
$ snap refresh freecad --channel=edge freecad
\`\`\``
});
5 changes: 3 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ jobs:
publish_amd64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: snapcore/action-build@v1
id: build
with:
snapcraft-args: "--enable-experimental-extensions"
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
store_login: ${{ secrets.STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: candidate
2 changes: 1 addition & 1 deletion .github/workflows/publish-toponaming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: "0 0 * * *" # Every day at 0:00
workflow_dispatch: # or manually

jobs:
publish_amd64:
runs-on: ubuntu-20.04
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: mixed-line-ending
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ There are multiple apps/commands included in the snap:

- `freecad.freecad`: Run FreeCAD
- `freecad.cmd`: Run FreeCAD command line interface
- `freecad.pip`: Install python packages for user (not system-wide).
E.g. `freecad.pip install py_slvs` for Assembly3.
- `freecad.pip`: Install python packages for user (not system-wide).
E.g. `freecad.pip install py_slvs` for Assembly3.

## FreeCAD Link Branch by RealThunder

There's also a snap that packages the well-known experimental FreeCAD fork by RealThunder: https://snapcraft.io/freecad-realthunder
Try it for some exciting new features and improvements.

[![freecad-realthunder](https://snapcraft.io/freecad-realthunder/badge.svg)](https://snapcraft.io/freecad-realthunder)

7 changes: 0 additions & 7 deletions snap/local/snap-setup-mod/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ def add_snap_pythonpath():
for path in pythonpath.split(":"):
sys.path.insert(0, path)

def configure_mod_raytracing():
import FreeCAD
param = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Raytracing")
if not param.GetString("PovrayExecutable", ""):
param.SetString("PovrayExecutable", "/snap/freecad/current/usr/bin/povray")

def configure_mod_mesh():
import FreeCAD
param = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Mesh/Meshing")
Expand All @@ -28,6 +22,5 @@ def fix_theme():
param.SetBool("ThemeSearchPaths", False)

add_snap_pythonpath()
configure_mod_raytracing()
configure_mod_mesh()
fix_theme()
Loading

0 comments on commit 14109e8

Please sign in to comment.