1+ # ===----------------------------------------------------------------------===#
2+ # This source file is part of github.com/apple/SwiftUsd
3+ #
4+ # Copyright © 2025 Apple Inc. and the SwiftUsd project authors.
5+ #
6+ # Licensed under the Apache License, Version 2.0 (the "License");
7+ # you may not use this file except in compliance with the License.
8+ # You may obtain a copy of the License at
9+ #
10+ # https://www.apache.org/licenses/LICENSE-2.0
11+ #
12+ # Unless required by applicable law or agreed to in writing, software
13+ # distributed under the License is distributed on an "AS IS" BASIS,
14+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ # See the License for the specific language governing permissions and
16+ # limitations under the License.
17+ #
18+ # SPDX-License-Identifier: Apache-2.0
19+ # ===----------------------------------------------------------------------===#
20+
21+ # Installs CMake 3.26.5 for macOS
22+
23+ name : Install CMake
24+
25+ runs :
26+ using : " composite"
27+ steps :
28+
29+ - name : Download CMake
30+ run : |
31+ curl https://github.com/Kitware/CMake/releases/download/v3.26.5/cmake-3.26.5-macos-universal.dmg \
32+ --output CMake.dmg
33+ working-directory : ${{ runner.temp }}
34+ shell : bash
35+
36+
37+ - name : Verify SHA256 checksum
38+ run : |
39+ # Hard-coded checksum taken from https://github.com/Kitware/CMake/releases/download/v3.26.5/cmake-3.26.5-SHA-256.txt,
40+ # cmake-3.26.5-macos-universal.dmg
41+ echo '18fb759bbdd04309be6a8e12920a8183ebbb17b331a6b7fc6a4071a68e5c81fd *CMake.dmg' | shasum -a 256 -c
42+ working-directory : ${{ runner.temp }}
43+ shell : bash
44+
45+
46+ - name : Attach DMG
47+ run : hdiutil attach CMake.dmg
48+ working-directory : ${{ runner.temp }}
49+ shell : bash
50+
51+ - name : Copy app to permanent location
52+ run : |
53+ cp /Volumes/CMake/CMake.app ../CMake.app
54+ hdiutil detach /Volumes/CMake
55+ working-directory : ${{ github.workspace }
56+ shell : bash
57+
58+ - name : Add CMake to PATH
59+ run : |
60+ # Note: `export PATH=` doesn't work for GitHub actions, the environment variable
61+ # must be set by redirecting into GITHUB_ENV
62+ echo "PATH=$PATH:$GITHUB_WORKSPACE/../CMake.app/Contents/bin" >> $GITHUB_ENV
63+ shell : bash
64+
65+ - name : Test CMake is in PATH
66+ run : which cmake
67+ shell : bash
0 commit comments