diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index 3b18722e7..f9b7ff5e7 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -73,6 +73,59 @@ jobs: --jq '.actions_caches.[] | select(.ref|test("refs/heads/master")|not) | {id, key, ref} | join(";")' &> /dev/null)" echo '::endgroup::' + macos-build: + name: Build macOS Dependencies + runs-on: macos-13 + strategy: + fail-fast: true + matrix: + target: [macos-arm64, macos-x86_64] + include: + - target: macos-arm64 + config: Release + type: static + - target: macos-x86_64 + config: Release + type: static + defaults: + run: + shell: zsh --no-rcs --errexit --pipefail {0} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Environment + id: setup + run: | + : Setup Environment + + to_remove=() + + for formula (llvm gcc) { + if [[ -d /usr/local/opt/"${formula}" ]] to_remove+=(${formula}) + } + + if (( #to_remove )) brew uninstall --ignore-dependencies ${to_remove} + + local -r date_string=$(date +"%Y-%m-%d") + print "ccacheDate=${date_string} >> $GITHUB_OUTPUT + + - name: Restore Compilation Cache + id: ccache-cache + uses: actions/cache@v3 + with: + path: ${{ github.workspace }}/.ccache + key: ${{ matrix.target }}-ccache-deps-${{ matrix.config }}-${{ steps.setup.outputs.ccacheDate }} + restore-keys: | + ${{ matrix.target }}-ccache-deps-${{ matrix.config }}- + + - name: Build macOS Dependencies + uses: ./.github/actions/build-deps + with: + target: ${{ matrix.target }} + type: ${{ matrix.type }} + config: ${{ matrix.config }} + windows-build: name: Build Windows Dependencies runs-on: windows-2022