From 2e1f7554e2822e28f00835575bc3b0ceb691a19e Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:33:00 +0200 Subject: [PATCH 1/9] test From f104d42849f2d31ace45fb6985f7d528804b164d Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:39:08 +0200 Subject: [PATCH 2/9] test2 From 0d6e5d0f490979cbb7311ed455cbb55c56498883 Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:41:33 +0200 Subject: [PATCH 3/9] test3 --- .github/workflows/ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e16f91..ac03a2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,24 +12,12 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - - os: ubuntu-latest - target: aarch64-unknown-linux-gnu - - os: ubuntu-24.04-arm - target: aarch64-unknown-linux-gnu - os: ubuntu-24.04-arm target: armv7-unknown-linux-gnueabihf base_image: raspios_lite:latest - os: ubuntu-24.04-arm target: thumbv7neon-unknown-linux-gnueabihf base_image: raspios_lite:latest - - os: windows-latest - target: x86_64-pc-windows-msvc - - os: windows-11-arm - target: aarch64-pc-windows-msvc - - os: macos-latest - target: aarch64-apple-darwin runs-on: ${{ matrix.os }} name: Build & test on ${{ matrix.os }} / ${{ matrix.target }} From ba9d3e440b9c0f127bdee732e614219246447a4f Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:03:57 +0200 Subject: [PATCH 4/9] test4 --- .github/workflows/ci-coverage.yml | 35 ------------- .github/workflows/ci.yml | 60 +++++++++++++++++++++- .github/workflows/coverage.yml | 83 ------------------------------- .github/workflows/doc.yml | 30 ----------- .github/workflows/publish.yml | 27 ---------- .github/workflows/rust-clippy.yml | 55 -------------------- 6 files changed, 59 insertions(+), 231 deletions(-) delete mode 100644 .github/workflows/ci-coverage.yml delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/doc.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/rust-clippy.yml diff --git a/.github/workflows/ci-coverage.yml b/.github/workflows/ci-coverage.yml deleted file mode 100644 index 0562ccd..0000000 --- a/.github/workflows/ci-coverage.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: PR Diff Coverage - -on: - pull_request: - branches: [ main ] - -jobs: - diff-coverage: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Install Tarpaulin - run: cargo install cargo-tarpaulin --version 0.32.0 --force - - - name: Run Tarpaulin -> JSON summary - run: | - mkdir -p coverage - cargo tarpaulin \ - --out Json \ - --output-dir coverage \ - -- --test-threads=1 - - - name: Archive coverage JSON - uses: actions/upload-artifact@v4 - with: - name: coverage-summary - path: coverage/coverage-summary.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac03a2e..448024e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,6 +75,29 @@ jobs: cargo build --target ${{ matrix.target }} --release fi + - name: Build test binaries (ARM targets) + if: matrix.target == 'armv7-unknown-linux-gnueabihf' || matrix.target == 'thumbv7neon-unknown-linux-gnueabihf' + shell: bash + env: + CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc + CARGO_TARGET_THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc + OPENSSL_LIB_DIR: /usr/lib/arm-linux-gnueabihf + OPENSSL_INCLUDE_DIR: /usr/include/openssl + PKG_CONFIG_ALLOW_CROSS: 1 + PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig + run: | + cargo test --target ${{ matrix.target }} --no-run --release + + - name: Build test binaries (other targets) + if: matrix.target != 'armv7-unknown-linux-gnueabihf' && matrix.target != 'thumbv7neon-unknown-linux-gnueabihf' + shell: bash + run: | + if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" && "${{ matrix.os }}" == "ubuntu-latest" ]]; then + echo "skip" + else + cargo test --target ${{ matrix.target }} --no-run --release + fi + - name: Test (ARM targets) if: matrix.target == 'armv7-unknown-linux-gnueabihf' || matrix.target == 'thumbv7neon-unknown-linux-gnueabihf' shell: bash @@ -96,4 +119,39 @@ jobs: echo "skip" else cargo test --target ${{ matrix.target }} -- --nocapture - fi \ No newline at end of file + fi + + - name: Prepare test artifacts + shell: bash + run: | + mkdir -p test-artifacts + # Copy test binaries (both debug and release) + if [ -d "target/${{ matrix.target }}/release/deps" ]; then + cp -r target/${{ matrix.target }}/release/deps test-artifacts/release-deps || true + fi + if [ -d "target/${{ matrix.target }}/debug/deps" ]; then + cp -r target/${{ matrix.target }}/debug/deps test-artifacts/debug-deps || true + fi + # Copy any test executables in examples + if [ -d "target/${{ matrix.target }}/release/examples" ]; then + cp -r target/${{ matrix.target }}/release/examples test-artifacts/release-examples || true + fi + if [ -d "target/${{ matrix.target }}/debug/examples" ]; then + cp -r target/${{ matrix.target }}/debug/examples test-artifacts/debug-examples || true + fi + # Create a build info file + echo "Target: ${{ matrix.target }}" > test-artifacts/build-info.txt + echo "OS: ${{ matrix.os }}" >> test-artifacts/build-info.txt + echo "Build Date: $(date)" >> test-artifacts/build-info.txt + echo "Rust Version: $(rustc --version)" >> test-artifacts/build-info.txt + echo "Cargo Version: $(cargo --version)" >> test-artifacts/build-info.txt + # List all files for debugging + find test-artifacts -type f > test-artifacts/file-list.txt + + - name: Upload test binaries + uses: actions/upload-artifact@v4 + with: + name: test-binaries-${{ matrix.target }}-${{ matrix.os }} + path: test-artifacts/ + retention-days: 1 + if-no-files-found: warn \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index ca92094..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Code Coverage - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - coverage-matrix: - name: Coverage on ${{ matrix.os }} / ${{ matrix.target }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - #- os: ubuntu-latest - # target: aarch64-unknown-linux-gnu - - os: windows-latest - target: x86_64-pc-windows-msvc - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - # Linux deps + QEMU for ARM64 - - name: Install Linux packages - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y llvm lcov qemu-user-static gcc-aarch64-linux-gnu binfmt-support - - - name: Enable QEMU binfmt - if: runner.os == 'Linux' - run: sudo update-binfmts --enable qemu-aarch64 - - - name: Verify QEMU installation - if: runner.os == 'Linux' - run: | - qemu-aarch64-static --version - echo "QEMU for ARM64 is properly configured." - - - name: Install cross - if: runner.os == 'Linux' - run: cargo install cross --locked - - # Windows LLVM - - name: Install LLVM on Windows - if: runner.os == 'Windows' - run: choco install llvm --no-progress - - # Nightly + llvm-cov - - name: Install Rust nightly - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - - name: Install cargo-llvm-cov - run: cargo install cargo-llvm-cov --locked - - # Install the standard library for the chosen target - - name: Add Rust target - run: rustup target add ${{ matrix.target }} - - # Run coverage in one logical command (no backslashes) - - name: Run coverage - env: - RUSTFLAGS: "-C instrument-coverage" - CARGO_INCREMENTAL: "0" - shell: bash - run: | - cargo llvm-cov --branch --workspace --html --target ${{ matrix.target }} - - - name: Move HTML report - run: mv target/llvm-cov/html target/coverage-${{ matrix.os }}-${{ matrix.target }} - - - name: Upload HTML coverage report - uses: actions/upload-artifact@v4 - with: - name: html-report-${{ matrix.os }}-${{ matrix.target }} - path: target/coverage-${{ matrix.os }}-${{ matrix.target }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index 3f9bb4e..0000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Build and Upload Doc - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build-docs: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: Build documentation - run: cargo doc --no-deps - - - name: Upload documentation as artifact (main branch only) - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - uses: actions/upload-artifact@v4 - with: - name: rust-docs - path: target/doc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 8786ca7..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Publish to crates.io - -on: - workflow_dispatch: - push: - tags: - - 'v*.*.*' - -jobs: - publish: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - environment: crates-io-publish - steps: - - uses: actions/checkout@v4 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - - name: Publish to crates.io - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - run: cargo publish --locked diff --git a/.github/workflows/rust-clippy.yml b/.github/workflows/rust-clippy.yml deleted file mode 100644 index daae2d0..0000000 --- a/.github/workflows/rust-clippy.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# rust-clippy is a tool that runs a bunch of lints to catch common -# mistakes in your Rust code and help improve your Rust code. -# More details at https://github.com/rust-lang/rust-clippy -# and https://rust-lang.github.io/rust-clippy/ - -name: rust-clippy analyze - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '25 15 * * 3' - -jobs: - rust-clippy-analyze: - name: Run rust-clippy analyzing - runs-on: ubuntu-latest - permissions: - contents: read - security-events: write - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Rust toolchain - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1 - with: - profile: minimal - toolchain: stable - components: clippy - override: true - - - name: Install required cargo - run: cargo install clippy-sarif sarif-fmt - - - name: Run rust-clippy - run: - cargo clippy - --all-features - --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt - continue-on-error: true - - - name: Upload analysis results to GitHub - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: rust-clippy-results.sarif - wait-for-processing: true From 5e0ba27c6d642b4c348c0405b32818217cbbf97b Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:10:16 +0200 Subject: [PATCH 5/9] test5 From f8cc5d2e5ce933e131f53665edbe9f59a2c1a146 Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:15:21 +0200 Subject: [PATCH 6/9] test6 From 6133728c6ebb338d419326ad9e159123c21b0f23 Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:19:30 +0200 Subject: [PATCH 7/9] test7 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 448024e..ee3cada 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,6 +122,7 @@ jobs: fi - name: Prepare test artifacts + if: always() shell: bash run: | mkdir -p test-artifacts @@ -149,6 +150,7 @@ jobs: find test-artifacts -type f > test-artifacts/file-list.txt - name: Upload test binaries + if: always() uses: actions/upload-artifact@v4 with: name: test-binaries-${{ matrix.target }}-${{ matrix.os }} From eb3e9a6d7161e268641856d75da7f7f8338b14f3 Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:24:42 +0200 Subject: [PATCH 8/9] test8 From dabfc953f6044169e273c6f2fe89e2b44231575a Mon Sep 17 00:00:00 2001 From: Feiryn <98115666+Feiryn@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:28:00 +0200 Subject: [PATCH 9/9] test9