File tree Expand file tree Collapse file tree
.github/actions/setup_macports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " setup macports"
2+ description : " setup MacPorts on macOS"
3+ runs :
4+ using : " composite"
5+ steps :
6+ - name : Cache MacPorts
7+ uses : actions/cache@v3
8+ id : cache-macports
9+ with :
10+ path : /opt/local/
11+ key : macports-v2.10.7-${{ runner.os }}-${{ inputs.compiler }}
12+
13+ - name : Fix MacPorts permissions
14+ if : ${{ steps.cache-macports.outputs.cache-hit == 'true' }}
15+ shell : bash
16+ run : sudo chown -R root:wheel /opt/local
17+
18+ - name : Install MacPorts
19+ if : ${{ steps.cache-macports.outputs.cache-hit != 'true' }}
20+ shell : bash
21+ run : |
22+ curl -LO https://github.com/macports/macports-base/releases/download/v2.10.7/MacPorts-2.10.7-15-Sequoia.pkg
23+ sudo installer -pkg MacPorts-2.10.7-15-Sequoia.pkg -target /
24+
25+ - name : Add MacPorts to system paths
26+ shell : bash
27+ run : |
28+ # so sudo can find port
29+ echo "/opt/local/bin" | sudo tee -a /etc/paths
30+ echo "/opt/local/sbin" | sudo tee -a /etc/paths
31+ # also ensure it’s in the user path
32+ echo "/opt/local/bin" >> $GITHUB_PATH
33+ hash -r
You can’t perform that action at this time.
0 commit comments