Skip to content

Rename: makecv → CVX (@hrtips/cvx, binary: cvx) #11

Rename: makecv → CVX (@hrtips/cvx, binary: cvx)

Rename: makecv → CVX (@hrtips/cvx, binary: cvx) #11

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [20, 22, 24]
include:
- os: windows-latest
node: 22
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
- name: Packaged E2E — init, build, ATS
shell: bash
run: |
npm pack
TARBALL="$PWD/$(ls hrtips-cvx-*.tgz)"
DIR="$(mktemp -d)"
cd "$DIR"
npm init -y > /dev/null
npm install --no-audit --no-fund "$TARBALL"
npx cvx init
npx cvx build
npx cvx build --ats
test -f bruce-wayne.pdf && test -f bruce-wayne-ats.pdf
- name: Reproducibility — two pinned builds must be byte-identical
shell: bash
run: |
DIR="$(mktemp -d)"
cd "$DIR"
npm init -y > /dev/null
npm install --no-audit --no-fund "$(ls "$GITHUB_WORKSPACE"/hrtips-cvx-*.tgz)"
npx cvx init
SOURCE_DATE_EPOCH=1700000000 npx cvx build
H1="$(node -e "console.log(require('crypto').createHash('sha256').update(require('fs').readFileSync('bruce-wayne.pdf')).digest('hex'))")"
SOURCE_DATE_EPOCH=1700000000 npx cvx build
H2="$(node -e "console.log(require('crypto').createHash('sha256').update(require('fs').readFileSync('bruce-wayne.pdf')).digest('hex'))")"
echo "run1: $H1"
echo "run2: $H2"
test "$H1" = "$H2"
# Alert-only: does the upcoming @react-pdf/renderer break rendering or
# byte-identical reproducibility? Never fails the workflow — it exists to
# surface upstream drift before a dependency bump lands.
upstream-canary:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
- run: npm ci
- name: Install upstream head of @react-pdf/renderer
run: npm install --no-save @react-pdf/renderer@next 2>/dev/null || npm install --no-save @react-pdf/renderer@latest
- run: npm test
- name: Reproducibility against upstream head
shell: bash
run: |
SOURCE_DATE_EPOCH=1700000000 npm run pdf
H1="$(node -e "console.log(require('crypto').createHash('sha256').update(require('fs').readFileSync('bruce-wayne.pdf')).digest('hex'))")"
SOURCE_DATE_EPOCH=1700000000 npm run pdf
H2="$(node -e "console.log(require('crypto').createHash('sha256').update(require('fs').readFileSync('bruce-wayne.pdf')).digest('hex'))")"
echo "run1: $H1"
echo "run2: $H2"
test "$H1" = "$H2"