Darwin Package Smoke #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Darwin Package Smoke | |
| on: | |
| schedule: | |
| # Monday 12:00 UTC. Skip the build when main had no commits in the last 7 days. | |
| - cron: "0 12 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: darwin-package-smoke | |
| cancel-in-progress: false | |
| jobs: | |
| macos-package-smoke: | |
| runs-on: macos-15 | |
| timeout-minutes: 90 | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Decide whether to build | |
| id: decide | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "run=true" >> "$GITHUB_OUTPUT" | |
| echo "Manual dispatch: always build" | |
| exit 0 | |
| fi | |
| count="$(git rev-list --count --since='7 days ago' HEAD)" | |
| echo "Commits in the last 7 days: $count" | |
| if [ "$count" -gt 0 ]; then | |
| echo "run=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "run=false" >> "$GITHUB_OUTPUT" | |
| echo "No commits in the last 7 days; skipping Darwin package build" | |
| fi | |
| - name: Install Nix | |
| if: steps.decide.outputs.run == 'true' | |
| uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| determinate: false | |
| extra-conf: | | |
| accept-flake-config = true | |
| max-jobs = 1 | |
| cores = 2 | |
| - name: Build aarch64-darwin packages and checks | |
| if: steps.decide.outputs.run == 'true' | |
| run: | | |
| for package in \ | |
| yazelix \ | |
| yazelix-no-helix \ | |
| yazelix-no-yazi \ | |
| yazelix-no-helix-no-yazi; do | |
| path="$(nix build --no-link --no-write-lock-file --print-out-paths --print-build-logs ".#packages.aarch64-darwin.$package")" | |
| test ! -e "$path/share/applications" | |
| done | |
| nix build --no-link --no-write-lock-file --print-build-logs \ | |
| .#checks.aarch64-darwin.desktop_channels \ | |
| .#checks.aarch64-darwin.home_manager \ | |
| .#checks.aarch64-darwin.host_yazi_contracts \ | |
| .#checks.aarch64-darwin.rio_contracts \ | |
| .#checks.aarch64-darwin.no_helix_contracts \ | |
| .#checks.aarch64-darwin.yzx_yazi_materialization |