From bdd87a6ce7b46b5b08fbfbf65fc2c1e5885326c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 27 Oct 2024 11:50:30 +0800 Subject: [PATCH] CI: try adding netbsd --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 4 ++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de15b0a5..fd2f10ca9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -433,6 +433,42 @@ jobs: name: fastfetch-openbsd-amd64 path: ./fastfetch-*.* + netbsd-amd64: + name: NetBSD-amd64 + runs-on: ubuntu-latest + permissions: + security-events: write + contents: read + steps: + - name: checkout repository + uses: actions/checkout@v4 + + - name: run VM + uses: cross-platform-actions/action@master + with: + operating_system: netbsd + architecture: x86-64 + cpu_count: 4 + shell: bash + version: '10.0' + run: | + uname -a + sudo pkgin -y install cmake git pkgconf + cmake -DSET_TWEAK=Off -DBUILD_TESTS=On . + cmake --build . --target package --verbose -j4 + ./fastfetch --list-features + time ./fastfetch -c presets/ci.jsonc --stat false + time ./fastfetch -c presets/ci.jsonc --format json + time ./flashfetch + ldd fastfetch + ctest + + - name: upload artifacts + uses: actions/upload-artifact@v4 + with: + name: fastfetch-openbsd-amd64 + path: ./fastfetch-*.* + windows-amd64: name: Windows-amd64 runs-on: windows-latest diff --git a/CMakeLists.txt b/CMakeLists.txt index c3d69a628..2bd8fbbaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1417,6 +1417,10 @@ elseif(OpenBSD) PRIVATE "m" PRIVATE "kvm" ) +elseif(NetBSD) + target_link_libraries(libfastfetch + PRIVATE "m" + ) elseif(SunOS) target_link_libraries(libfastfetch PRIVATE "m"