27
name: Build macOS 13 (Apple Silicon)
44
value: ${{ jobs.Build.outputs.reportFile }}
48
runs-on: macos-13-xlarge
49
continue-on-error: ${{ inputs.allowedToFail }}
51
CCACHE_DIR: ${{ github.workspace }}/ccache
52
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
54
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion"
56
CCACHE_COMPRESSLEVEL: 1
57
CC: arm64-apple-darwin20.0.0-clang
58
CXX: arm64-apple-darwin20.0.0-clang++
59
builddir: ${{ github.workspace }}/build/release/
61
reportdir: /tmp/report/
62
reportfilename: ${{ inputs.artifactBasename }}-report.md
67
reportFile: ${{ steps.Init.outputs.reportFile }}
70
- name: Checking out source code
71
uses: actions/checkout@v4
74
- name: Setup Miniconda
75
uses: conda-incubator/setup-miniconda@v3
77
activate-environment: .conda/freecad
78
environment-file: conda/conda-env.yaml
79
channels: conda-forge,defaults
80
channel-priority: true
81
miniforge-version: latest
82
- name: Install FreeCAD dependencies
84
./conda/setup-environment.sh
85
- name: Set Environment Variables
87
echo "CC=$CC" >> "$GITHUB_ENV"
88
echo "CXX=$CXX" >> "$GITHUB_ENV"
89
- name: Make needed directories, files and initializations
92
mkdir -p ${{ env.CCACHE_DIR }}
93
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
94
mkdir -p ${{ env.builddir }}
95
mkdir -p ${{ env.logdir }}
96
mkdir -p ${{ env.reportdir }}
97
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
98
- name: Generate cache key
100
uses: ./.github/workflows/actions/macos/generateCacheKey
102
compiler: ${{ env.CXX }}
103
- name: Restore Compiler Cache
104
uses: actions/cache@v4
107
path: ${{ env.CCACHE_DIR }}
108
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
110
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
111
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
112
- name: Print CCache statistics before build, reset stats and print config
117
- name: CMake Configure
119
mamba run --live-stream -p .conda/freecad cmake --preset conda-macos-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
122
mamba run --live-stream -p .conda/freecad cmake --build build/release
123
- name: Print ccache statistics after Build
126
- name: FreeCAD CLI tests on build dir
127
if: inputs.testOnBuildDir
129
uses: ./.github/workflows/actions/runPythonTests
131
testDescription: "CLI tests on build dir"
132
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
133
logFile: ${{ env.logdir }}TestCLIBuild.log
134
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
137
uses: ./.github/workflows/actions/runCPPTests/runAllTests
139
reportdir: ${{ env.reportdir }}
140
builddir: ${{ env.builddir }}
141
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
142
- name: CMake Install
144
mamba run --live-stream -p .conda/freecad cmake --install build/release
145
- name: FreeCAD CLI tests on install
147
uses: ./.github/workflows/actions/runPythonTests
149
testDescription: "CLI tests on install"
150
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
151
logFile: ${{ env.logdir }}TestCLIInstall.log
152
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
155
uses: actions/upload-artifact@v4
157
name: ${{ inputs.artifactBasename }}-Logs
161
- name: Upload report
163
uses: actions/upload-artifact@v4
165
name: ${{ env.reportfilename }}
167
${{env.reportdir}}${{ env.reportfilename }}