forked from FreeCAD/FreeCAD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
1,101 changed files
with
52,865 additions
and
39,856 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
# *************************************************************************** | ||
# * * | ||
# * Copyright (c) 2023 0penBrain. * | ||
# * * | ||
# * This file is part of FreeCAD. * | ||
# * * | ||
# * FreeCAD is free software: you can redistribute it and/or modify it * | ||
# * under the terms of the GNU Lesser General Public License as * | ||
# * published by the Free Software Foundation, either version 2.1 of the * | ||
# * License, or (at your option) any later version. * | ||
# * * | ||
# * FreeCAD is distributed in the hope that it will be useful, but * | ||
# * WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | ||
# * Lesser General Public License for more details. * | ||
# * * | ||
# * You should have received a copy of the GNU Lesser General Public * | ||
# * License along with FreeCAD. If not, see * | ||
# * <https://www.gnu.org/licenses/>. * | ||
# * * | ||
# *************************************************************************** | ||
|
||
name: build | ||
description: "macOS: build application" | ||
|
||
inputs: | ||
builddir: | ||
description: "Directory where build will happen" | ||
required: true | ||
logFile: | ||
description: "Path for log file" | ||
required: true | ||
errorFile: | ||
description: "Path to error file" | ||
required: true | ||
reportFile: | ||
description: "Path for report file" | ||
required: true | ||
extraParameters: | ||
description: "Extra parameters to CMake build" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build | ||
id: build | ||
shell: bash -l {0} | ||
run: | | ||
(cmake --build ${{ inputs.builddir }} -j$(nproc) ${{ inputs.extraParameters }}) \ | ||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }} | ||
- name: Write report | ||
shell: bash -l {0} | ||
if: always() | ||
run: | | ||
if [ ${{ steps.build.outcome }} == 'success' ] | ||
then | ||
echo "<details><summary>:heavy_check_mark: CMake build succeeded</summary>" >> ${{ inputs.reportFile }} | ||
else | ||
echo "<details><summary>:fire: CMake build failed</summary>" >> ${{ inputs.reportFile }} | ||
fi | ||
echo "" >> ${{ inputs.reportFile }} | ||
echo "Build Error Log (stderr output):" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
echo "</details>">> ${{ inputs.reportFile }} | ||
echo "" >> ${{ inputs.reportFile }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
# *************************************************************************** | ||
# * * | ||
# * Copyright (c) 2023 0penBrain. * | ||
# * * | ||
# * This file is part of FreeCAD. * | ||
# * * | ||
# * FreeCAD is free software: you can redistribute it and/or modify it * | ||
# * under the terms of the GNU Lesser General Public License as * | ||
# * published by the Free Software Foundation, either version 2.1 of the * | ||
# * License, or (at your option) any later version. * | ||
# * * | ||
# * FreeCAD is distributed in the hope that it will be useful, but * | ||
# * WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | ||
# * Lesser General Public License for more details. * | ||
# * * | ||
# * You should have received a copy of the GNU Lesser General Public * | ||
# * License along with FreeCAD. If not, see * | ||
# * <https://www.gnu.org/licenses/>. * | ||
# * * | ||
# *************************************************************************** | ||
|
||
name: configure | ||
description: "macOS: configure CMake" | ||
|
||
inputs: | ||
sourcedir: | ||
description: "Directory where sources are stored" | ||
required: false | ||
default: ./ | ||
builddir: | ||
description: "Directory where build will happen" | ||
required: true | ||
logFile: | ||
description: "Path for log file" | ||
required: true | ||
errorFile: | ||
description: "Path to error file" | ||
required: true | ||
reportFile: | ||
description: "Path for report file" | ||
required: true | ||
extraParameters: | ||
description: "Extra parameters to CMake configure" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure CMake | ||
id: configure | ||
shell: bash -l {0} | ||
run: | | ||
(cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \ | ||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }} | ||
- name: Write report | ||
shell: bash -l {0} | ||
if: always() | ||
run: | | ||
if [ ${{ steps.configure.outcome }} == 'success' ] | ||
then | ||
echo "<details><summary>:heavy_check_mark: CMake configure succeeded</summary>" >> ${{ inputs.reportFile }} | ||
echo "" >> ${{ inputs.reportFile }} | ||
echo "Configure Error Log (stderr output):" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
else | ||
echo "<details><summary>:fire: CMake configure failed</summary>" >> ${{ inputs.reportFile }} | ||
fi | ||
echo "" >> ${{ inputs.reportFile }} | ||
echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
echo "</details>">> ${{ inputs.reportFile }} | ||
echo "" >> ${{ inputs.reportFile }} |
44 changes: 44 additions & 0 deletions
44
.github/workflows/actions/macos/generateCacheKey/action.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
# *************************************************************************** | ||
# * * | ||
# * Copyright (c) 2023 0penBrain. * | ||
# * * | ||
# * This file is part of FreeCAD. * | ||
# * * | ||
# * FreeCAD is free software: you can redistribute it and/or modify it * | ||
# * under the terms of the GNU Lesser General Public License as * | ||
# * published by the Free Software Foundation, either version 2.1 of the * | ||
# * License, or (at your option) any later version. * | ||
# * * | ||
# * FreeCAD is distributed in the hope that it will be useful, but * | ||
# * WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | ||
# * Lesser General Public License for more details. * | ||
# * * | ||
# * You should have received a copy of the GNU Lesser General Public * | ||
# * License along with FreeCAD. If not, see * | ||
# * <https://www.gnu.org/licenses/>. * | ||
# * * | ||
# *************************************************************************** | ||
|
||
name: generateCacheKey | ||
description: "macOS: generates a cache key taking into account distro and compiler" | ||
|
||
inputs: | ||
compiler: | ||
description: "Binary name/path of compiler to be used" | ||
required: true | ||
outputs: | ||
cacheKey: | ||
description: "Cache key with distro and compiler version" | ||
value: ${{ steps.generateCacheKey.outputs.cacheKey }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: generateCacheKey | ||
shell: bash -l {0} | ||
run: | | ||
cacheKey=$(sw_vers --productName)-$(sw_vers --productVersion)-$(basename ${{ inputs.compiler }})$(${{ inputs.compiler }} -dumpfullversion -dumpversion) | ||
echo "Generated cache key : $cacheKey" | ||
echo "cacheKey=$cacheKey" >> $GITHUB_OUTPUT |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
# *************************************************************************** | ||
# * * | ||
# * Copyright (c) 2023 0penBrain. * | ||
# * * | ||
# * This file is part of FreeCAD. * | ||
# * * | ||
# * FreeCAD is free software: you can redistribute it and/or modify it * | ||
# * under the terms of the GNU Lesser General Public License as * | ||
# * published by the Free Software Foundation, either version 2.1 of the * | ||
# * License, or (at your option) any later version. * | ||
# * * | ||
# * FreeCAD is distributed in the hope that it will be useful, but * | ||
# * WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | ||
# * Lesser General Public License for more details. * | ||
# * * | ||
# * You should have received a copy of the GNU Lesser General Public * | ||
# * License along with FreeCAD. If not, see * | ||
# * <https://www.gnu.org/licenses/>. * | ||
# * * | ||
# *************************************************************************** | ||
|
||
name: install | ||
description: "macOS: install application" | ||
|
||
inputs: | ||
builddir: | ||
description: "Directory where build is stored" | ||
required: true | ||
logFile: | ||
description: "Path for log file" | ||
required: true | ||
errorFile: | ||
description: "Path to error file" | ||
required: true | ||
reportFile: | ||
description: "Path for report file" | ||
required: true | ||
extraParameters: | ||
description: "Extra parameters to CMake install" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install | ||
id: install | ||
shell: bash -l {0} | ||
run: | | ||
(sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \ | ||
2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }} | ||
- name: Write report | ||
shell: bash -l {0} | ||
if: always() | ||
run: | | ||
if [ ${{ steps.install.outcome }} == 'success' ] | ||
then | ||
echo "<details><summary>:heavy_check_mark: CMake install succeeded</summary>" >> ${{ inputs.reportFile }} | ||
else | ||
echo "<details><summary>:fire: CMake install failed</summary>" >> ${{ inputs.reportFile }} | ||
fi | ||
echo "" >> ${{ inputs.reportFile }} | ||
echo "Install Error Log (stderr output):" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
cat ${{ inputs.errorFile }} >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
echo "Install Error Log (stdout output trimmed to the last 100 Lines):" >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
tail -n 100 ${{ inputs.logFile }} >> ${{ inputs.reportFile }} | ||
echo '```' >> ${{ inputs.reportFile }} | ||
echo "</details>">> ${{ inputs.reportFile }} | ||
echo "" >> ${{ inputs.reportFile }} |
Oops, something went wrong.