From e0c0d92424c1cc0dbc88170ef3c843715e57035c Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 3 Nov 2024 01:39:53 +0000 Subject: [PATCH] feat(build/deps): switch from Homebrew to Nix for build dependencies --- .github/workflows/_build.yml | 32 ++++++++++++--------------- .github/workflows/_prepare.yml | 4 ++-- .github/workflows/build.yml | 2 +- .github/workflows/update-metadata.yml | 6 ++--- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index 7a69eb2..f0d360c 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -111,7 +111,7 @@ jobs: - uses: actions/setup-go@v5 if: ${{ inputs.os != inputs.build_os }} with: - go-version: "1.21" + go-version: "1.23" - name: Build emacs-builder tool if: ${{ inputs.os != inputs.build_os }} run: make build @@ -163,34 +163,30 @@ jobs: repository: jimeh/build-emacs-for-macos ref: ${{ needs.prepare.outputs.builder_sha }} path: builder - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.2" - - name: Update homebrew - run: brew update - - name: Fix system python breaking homebrew - run: >- - find "$(brew --prefix)/bin" -type l - -ilname '*/Library/Frameworks/Python.framework/*' - -delete - - name: Install dependencies - run: make bootstrap - working-directory: builder - env: - BUNDLE_WITHOUT: "development" + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Download build-plan artifact uses: actions/download-artifact@v4 with: name: ${{ inputs.artifact_prefix }}build-plan - path: ./ + path: ./builder/ + - name: Install dependencies + run: >- + nix develop + --command make bootstrap-ruby + working-directory: builder + env: + BUNDLE_WITHOUT: "development" - name: Build Emacs run: >- - ./builder/build-emacs-for-macos + nix develop + --command ./build-emacs-for-macos --log-level debug --plan build-plan.yml --native-full-aot --no-self-sign ${{ inputs.build_args }} + working-directory: builder env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload unsigned app artifact diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index b9f43ae..000fdca 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -12,7 +12,7 @@ on: description: Git ref to checkout of build-emacs-for-macos required: false type: string - default: "v0.6.48" + default: "v0.6.50" secrets: TAP_REPO_TOKEN: description: Personal Access Token for Homebrew Tap repo @@ -38,7 +38,7 @@ jobs: if-no-files-found: error - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.23" - name: Build emacs-builder tool run: make build - name: Upload emacs-builder artifact diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4608801..98b5f78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ on: builder_ref: description: "Git ref to checkout of build-emacs-for-macos" required: true - default: "v0.6.48" + default: "v0.6.50" builder_args: description: Custom arguments passed to build script required: false diff --git a/.github/workflows/update-metadata.yml b/.github/workflows/update-metadata.yml index 89b8393..77f3138 100644 --- a/.github/workflows/update-metadata.yml +++ b/.github/workflows/update-metadata.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout meta branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: meta - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.23" - name: update total downloads shield JSON run: >- go run . badges downloads @@ -25,7 +25,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - name: commit and push changes to meta branch - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore(meta): update metadata files" commit_user_name: github-actions[bot]