name: Emu third-party dependencies (macos) on: workflow_call: # needed since it allows this to become a reusable workflow workflow_dispatch: # allows manual trigger permissions: contents: write env: DEPS_CACHE_KEY: emu-deps-macos DEPS_CACHE_DIR: build/deps/macos PACKAGE_BASE_DIR: "build/package/macos" THIRD_PARTY_BASE_DIR: 'third-party' jobs: deps-build: runs-on: macos-13 if: ${{ !cancelled() }} steps: - name: Lookup cache for deps id: emu-deps-cache-step uses: actions/cache@v4 with: key: ${{ env.DEPS_CACHE_KEY }} path: ${{ env.DEPS_CACHE_DIR }} # we need branch because it has build scripts - name: Checkout branch if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' uses: actions/checkout@v4 - name: Clone third-party deps (deps/macos) if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: ref: 'third-party/deps/macos' path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/macos" - name: Clone third-party deps (deps/common) if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' uses: actions/checkout@v4 with: ref: 'third-party/deps/common' path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/common" ### fix folder permissions! not sure why this fails # nested subdirs "build/macos/release" cause permission problems - name: Give all permissions to repo folder if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' shell: bash working-directory: ${{ github.workspace }} run: sudo chmod -R 777 "${{ github.workspace }}" ### macos comes with bash v3 - name: Update bash if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' shell: bash run: brew update && brew install bash - name: Build deps if: steps.emu-deps-cache-step.outputs.cache-hit != 'true' shell: bash run: sudo chmod 777 build_macos_deps.sh && ./build_macos_deps.sh -verbose