From fe690fe5d1aeb1a491410916ee35e059480abe2a Mon Sep 17 00:00:00 2001 From: scribam Date: Tue, 5 May 2026 13:19:37 +0200 Subject: [PATCH 1/2] Bump actions in .github/workflows --- .github/workflows/builds.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 53b1d4b..d1be285 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -50,7 +50,7 @@ jobs: run: ctest --output-junit test_static.xml ${{ env.COMMON_CTEST_ARGS }} - name: Upload Test Results if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: Test Results Ubuntu path: | @@ -98,7 +98,7 @@ jobs: run: ctest --output-junit test_static.xml ${{ env.COMMON_CTEST_ARGS }} - name: Upload Test Results if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: Test Results macOS path: | @@ -204,7 +204,7 @@ jobs: run: ctest --output-junit test_ninja_static.xml ${{ env.COMMON_CTEST_ARGS }} - name: Upload Test Results if: always() - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: Test Results MSVC path: | @@ -271,7 +271,7 @@ jobs: with: path: src - name: Setup emsdk - uses: mymindstorm/setup-emsdk@v14 + uses: emscripten-core/setup-emsdk@v16 - name: Verify emsdk run: emcc -v - name: Install dependencies @@ -299,7 +299,7 @@ jobs: - uses: actions/checkout@v6 with: path: src - - uses: cross-platform-actions/action@v0.32.0 + - uses: cross-platform-actions/action@v1 with: operating_system: netbsd architecture: x86-64 @@ -327,7 +327,7 @@ jobs: - uses: actions/checkout@v6 with: path: src - - uses: cross-platform-actions/action@v0.32.0 + - uses: cross-platform-actions/action@v1 with: operating_system: omnios architecture: x86-64 @@ -344,9 +344,9 @@ jobs: uses: andstor/file-existence-action@v3 with: files: "install/shared/lib/libusb-1.0.so, \ - install/shared/include/libusb-1.0/libusb.h, \ - install/static/lib/libusb-1.0.a, \ - install/static/include/libusb-1.0/libusb.h" + install/shared/include/libusb-1.0/libusb.h, \ + install/static/lib/libusb-1.0.a, \ + install/static/include/libusb-1.0/libusb.h" fail: true openbsd-build: @@ -355,7 +355,7 @@ jobs: - uses: actions/checkout@v6 with: path: src - - uses: cross-platform-actions/action@v0.32.0 + - uses: cross-platform-actions/action@v1 with: operating_system: openbsd architecture: x86-64 @@ -372,9 +372,9 @@ jobs: uses: andstor/file-existence-action@v3 with: files: "install/shared/lib/libusb-1.0.so, \ - install/shared/include/libusb-1.0/libusb.h, \ - install/static/lib/libusb-1.0.a, \ - install/static/include/libusb-1.0/libusb.h" + install/shared/include/libusb-1.0/libusb.h, \ + install/static/lib/libusb-1.0.a, \ + install/static/include/libusb-1.0/libusb.h" fail: true publish-test-results: @@ -388,7 +388,7 @@ jobs: steps: - name: Download Artifacts - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: path: artifacts - name: Publish Test Results From 52eb4a42f6cd5dd0a51247b3782e9ffb75bb7410 Mon Sep 17 00:00:00 2001 From: scribam Date: Tue, 5 May 2026 13:19:37 +0200 Subject: [PATCH 2/2] Add MINGW CI --- .github/workflows/builds.yml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index d1be285..e86fe3c 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -105,6 +105,53 @@ jobs: build/shared/test_shared.xml build/static/test_static.xml + windows-mingw-build: + runs-on: windows-latest + defaults: + run: + shell: 'msys2 {0}' + env: + COMMON_CTEST_ARGS: --no-compress-output --output-on-failure + + steps: + - uses: actions/checkout@v6 + with: + path: src + - name: Install dependencies + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain + - name: Configure + run: | + rm -rf build install + cmake -B build/shared -S src -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/shared -DLIBUSB_BUILD_EXAMPLES=ON -DLIBUSB_BUILD_TESTING=ON -DLIBUSB_BUILD_SHARED_LIBS=ON + cmake -B build/static -S src -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/static -DLIBUSB_BUILD_EXAMPLES=ON -DLIBUSB_BUILD_TESTING=ON -DLIBUSB_BUILD_SHARED_LIBS=OFF + - name: Build Shared + working-directory: build/shared + run: ninja install + - name: Build Static + working-directory: build/static + run: ninja install + - name: Check artifacts + uses: andstor/file-existence-action@v3 + with: + files: "install/shared/lib/libusb-1.0.dll.a, \ + install/shared/bin/libusb-1.0.dll, \ + install/shared/include/libusb-1.0/libusb.h, \ + install/static/lib/libusb-1.0.a, \ + install/static/include/libusb-1.0/libusb.h" + fail: true + - name: Test Shared + if: always() + working-directory: build/shared + run: | + export PATH="$(pwd)/../../install/shared/bin:$PATH" + ctest --output-junit test_shared.xml ${{ env.COMMON_CTEST_ARGS }} + - name: Test Static + if: always() + working-directory: build/static + run: ctest --output-junit test_static.xml ${{ env.COMMON_CTEST_ARGS }} windows-msvc-build: runs-on: windows-latest