Build and Publish OpenSSL Packages workflow (nodegit/nodegit)
The Build and Publish OpenSSL Packages workflow from nodegit/nodegit, explained and optimized by Latchkey.
CI health: C - fair
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the Build and Publish OpenSSL Packages workflow from the nodegit/nodegit repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Build and Publish OpenSSL Packages
on:
workflow_dispatch:
jobs:
build-openssl:
name: Build OpenSSL package for (${{ matrix.os }} ${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
arch: arm64
- os: windows-latest
arch: x64
- os: macos-15
arch: arm64
- os: macos-15-intel
arch: x64
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Build OpenSSL packages
env:
npm_config_arch: ${{ matrix.arch }}
NODEGIT_OPENSSL_BUILD_PACKAGE: 1
OPENSSL_MACOS_DEPLOYMENT_TARGET: "11.0"
run: node utils/acquireOpenSSL.mjs
- name: Push OpenSSL package to S3
env:
npm_config_arch: ${{ matrix.arch }}
node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }}
AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }}
run: node utils/uploadOpenSSL.mjs
The same workflow, on Latchkey
Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.
name: Build and Publish OpenSSL Packages on: workflow_dispatch: jobs: build-openssl: timeout-minutes: 30 name: Build OpenSSL package for (${{ matrix.os }} ${{ matrix.arch }}) runs-on: ${{ matrix.os }} strategy: matrix: include: - os: windows-latest arch: arm64 - os: windows-latest arch: x64 - os: macos-15 arch: arm64 - os: macos-15-intel arch: x64 fail-fast: false steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: cache: 'npm' node-version: 22 - name: Install dependencies run: npm install - name: Build OpenSSL packages env: npm_config_arch: ${{ matrix.arch }} NODEGIT_OPENSSL_BUILD_PACKAGE: 1 OPENSSL_MACOS_DEPLOYMENT_TARGET: "11.0" run: node utils/acquireOpenSSL.mjs - name: Push OpenSSL package to S3 env: npm_config_arch: ${{ matrix.arch }} node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }} AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} run: node utils/uploadOpenSSL.mjs
What changed
- Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Dependency installs
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.