Skip to content

Cache result of Xcode license acceptance check #11

Cache result of Xcode license acceptance check

Cache result of Xcode license acceptance check #11

Workflow file for this run

---
name: "Build & Test MacPorts Base"
on:
- push
- pull_request
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, macos-12, macos-13, ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 64
- name: Cleanup /usr/local
if: startsWith(matrix.os,'macos')
run: |
sudo mkdir /opt/local.old
sudo mv /usr/local/* /opt/local.old
- name: Install Linux Dependencies
if: startsWith(matrix.os,'ubuntu')
run: >
sudo apt update &&
sudo apt install mtree-netbsd
libcurl4-openssl-dev
- name: Configure MacPorts Base
run: |
set -eu
./configure
- name: Build MacPorts Base
run: |
set -eu
platform=$(uname -s)
case ${platform} in
Darwin) make -j$(sysctl -n hw.activecpu)
;;
Linux) make -j$(nproc)
;;
esac
- name: Install MacPorts Base
run: |
set -eu
sudo make install
- name: Test MacPorts Base
if: startsWith(matrix.os,'macos')
run: |
set -eu
make test