From 24ead177bfaab450bb1debdba05ca66090d2957a Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 6 Nov 2025 01:03:31 +0800 Subject: [PATCH 1/5] Build FreeBSD on GH Actions in VM Signed-off-by: Daniel Schaefer --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32037c69..7499b0cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,25 @@ on: push: jobs: + build-freebsd: + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Build + id: test + uses: vmactions/freebsd-vm@v1 + with: + usesh: true + mem: 8192 + sync: rsync + prepare: | + pkg install -y rust hidapi pkgconf + run: | + cargo build -p framework_lib + cargo build -p framework_tool + freebsd-cross-build: name: Cross-Build for FreeBSD runs-on: 'ubuntu-24.04' From 52b8d8e7da8522abaf9abe972031efffdcda4e46 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 6 Nov 2025 00:56:55 +0800 Subject: [PATCH 2/5] README: Add more freebsd dependencies Signed-off-by: Daniel Schaefer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 722628d6..25a9160b 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ direnv shell sudo dnf install systemd-devel hidapi-devel # FreeBSD -sudo pkg install hidapi +sudo pkg install rust hidapi pkgconf ``` ```sh From be024564c4163fb792a0aa21f7999aa635d48450 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 6 Nov 2025 01:12:58 +0800 Subject: [PATCH 3/5] freebsd: Build with all features in cross build Signed-off-by: Daniel Schaefer --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7499b0cd..d88fef24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,9 @@ jobs: - name: Install cross compilation tool run: cargo install cross - - name: Build FreeBSD tool - run: cross build --target=x86_64-unknown-freebsd --no-default-features -p framework_lib + - name: Build FreeBSD lib + run: | + cross build --target=x86_64-unknown-freebsd -p framework_lib - name: Upload FreeBSD App uses: actions/upload-artifact@v4 From 9514f37f76a72bf146ae2fc0c13530f9c396e9bc Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 6 Nov 2025 01:13:16 +0800 Subject: [PATCH 4/5] freebsd: Remove cross build VM build is simpler. I don't want to debug dependency issues with the cross build. Signed-off-by: Daniel Schaefer --- .github/workflows/ci.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d88fef24..87de2f0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,38 +22,6 @@ jobs: cargo build -p framework_lib cargo build -p framework_tool - freebsd-cross-build: - name: Cross-Build for FreeBSD - runs-on: 'ubuntu-24.04' - env: - CARGO_NET_GIT_FETCH_WITH_CLI: true - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y libudev-dev libhidapi-dev - - - name: Setup Rust toolchain - run: | - rm rust-toolchain.toml - rustup target add x86_64-unknown-freebsd - rustup show - - - name: Install cross compilation tool - run: cargo install cross - - - name: Build FreeBSD lib - run: | - cross build --target=x86_64-unknown-freebsd -p framework_lib - - - name: Upload FreeBSD App - uses: actions/upload-artifact@v4 - with: - name: framework_tool_freebsd - path: target/x86_64-unknown-freebsd/debug/framework_tool - build: name: Build Linux runs-on: ubuntu-24.04 From 383062e461ba6fa715e610083e392a92955994d7 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 20 Nov 2025 08:22:08 +0800 Subject: [PATCH 5/5] gh-actions: Specify FreeBSD as 15.0 Signed-off-by: Daniel Schaefer --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87de2f0d..7354b8a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: id: test uses: vmactions/freebsd-vm@v1 with: + release: "15.0" + arch: x86_64 usesh: true mem: 8192 sync: rsync