1
0
mirror of https://git.tukaani.org/xz.git synced 2026-10-31 11:24:56 +00:00
xz/.github/workflows/netbsd.yml
Lasse Collin 0def412006
CI: Don't pin vmactions or MSYS2 actions to commit ID
These workflows don't use any secrets other than GITHUB_TOKEN, which
only has the 'contents: read' permission. That is, if an action was
compromised, it shouldn't be able to modify the repository or steal any
secrets. I recognize that a compromised action isn't completely harmless
still. For example, the runners on GitHub have Internet access which the
action could abuse until the workflow timeout (currently 10 or 20 minutes)
expires.

Now we always use the most recent actions instead of ones that are
sometimes several months old. The hassle of updating the pinned
commit IDs goes away. The benefits feel bigger than the risks.

Link: https://github.com/tukaani-project/xz/pull/227
2026-06-21 20:53:49 +03:00

40 lines
928 B
YAML

# SPDX-License-Identifier: 0BSD
name: NetBSD
on:
push:
branches: [ master, ci_run ]
workflow_dispatch:
permissions:
contents: read
jobs:
NetBSD:
runs-on: ubuntu-latest
timeout-minutes: 10
name: NetBSD
steps:
- uses: actions/checkout@v7
- name: Test in NetBSD
id: test
uses: vmactions/netbsd-vm@v1
with:
usesh: true
prepare: >
/usr/sbin/pkg_add -v
cmake
gettext-tools
ninja-build
po4a
run: |
set -e
uname -a
./po4a/update-po
# Innocent putc() triggers strict-overflow warnings.
cmake -G Ninja -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS='-UNDEBUG -g -O2 -pipe -Wno-error=strict-overflow' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
ninja -C build
ctest --test-dir build --output-on-failure