diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 34b0d929..7cfc1e75 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -68,6 +68,13 @@ jobs: timeout-minutes: 150 steps: - uses: actions/checkout@v4 + # Japanese UI/document fonts, embedded by crates/text/build.rs (CRAFT_FONTS_DIR in the VM). + # Bump the commit deliberately; see craftrules standards/fonts.md. + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: storytold/craft-fonts + ref: abb83316d96aa59c1cf64784289e378fe9fa5695 + path: craft-fonts - name: Package in a FreeBSD VM uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc with: @@ -81,9 +88,15 @@ jobs: . "$HOME/.cargo/env" git config --global --add safe.directory "$PWD" # Build outside the checkout so only dist/ is copied back out of the VM. + # The craft-fonts checkout is synced into the VM with the workspace. + export CRAFT_FONTS_DIR="$PWD/craft-fonts" CRAFT_FONTS_REQUIRED=1 export CARGO_TARGET_DIR=/var/tmp/vectorcraft-target CARGO_BUILD_JOBS=4 bash packaging/freebsd/package.sh - tar -tzf dist/release/vectorcraft-*-freebsd-x86_64.tar.gz | grep -E '/bin/vectorcraft$|/bin/vectorcraft-cli$|/share/applications/|/share/icons/hicolor/|/share/doc/vectorcraft/NOTICE' + # Every part the package must have, the craft-fonts licences included. + tar -tzf dist/release/vectorcraft-*-freebsd-x86_64.tar.gz >/var/tmp/contents.txt + for want in '/bin/vectorcraft$' '/bin/vectorcraft-cli$' '/share/applications/.*\.desktop$' '/share/icons/hicolor/' '/share/doc/vectorcraft/NOTICE$' '/share/doc/vectorcraft/OFL-.*\.txt$'; do + grep -Eq "$want" /var/tmp/contents.txt || { echo "missing from the package: $want"; exit 1; } + done - uses: actions/upload-artifact@v4 with: name: freebsd-package diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2eacf20e..3633d9a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -244,6 +244,13 @@ jobs: VECTORCRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} steps: - uses: actions/checkout@v4 + # Japanese UI/document fonts, embedded by crates/text/build.rs (CRAFT_FONTS_DIR in the VM). + # Bump the commit deliberately; see craftrules standards/fonts.md. + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: storytold/craft-fonts + ref: abb83316d96aa59c1cf64784289e378fe9fa5695 + path: craft-fonts - uses: dtolnay/rust-toolchain@stable if: inputs.version != '' - name: Apply version override @@ -265,6 +272,8 @@ jobs: . "$HOME/.cargo/env" git config --global --add safe.directory "$PWD" # Build outside the checkout so only dist/ is copied back out of the VM. + # The craft-fonts checkout is synced into the VM with the workspace. + export CRAFT_FONTS_DIR="$PWD/craft-fonts" CRAFT_FONTS_REQUIRED=1 export CARGO_TARGET_DIR=/var/tmp/vectorcraft-target CARGO_BUILD_JOBS=4 bash packaging/freebsd/package.sh - uses: actions/upload-artifact@v4