From ff3e00eb4e7e4dcb02e5b28b86a077aded971125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Mon, 16 Jun 2025 09:51:13 +0200 Subject: [PATCH] add(dependabot): create build check workflow for Dependabot pull requests --- .github/workflows/dependabot-build.yml | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/dependabot-build.yml diff --git a/.github/workflows/dependabot-build.yml b/.github/workflows/dependabot-build.yml new file mode 100644 index 0000000..e2ec073 --- /dev/null +++ b/.github/workflows/dependabot-build.yml @@ -0,0 +1,52 @@ +name: Dependabot Build Check + +on: + pull_request: + branches: [dev] + +permissions: + contents: read + pull-requests: read + +jobs: + build: + if: ${{ startsWith(github.head_ref, 'dependabot/') || github.actor == 'dependabot[bot]' }} + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Installer Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-unknown-linux-musl + override: true + + - name: Installer cross + run: cargo install cross + + - name: Créer Cross.toml pour spécifier OpenSSL vendored + run: | + cat > Cross.toml << 'EOF' + [build.env] + passthrough = [ + "RUSTFLAGS", + "OPENSSL_STATIC", + "OPENSSL_NO_VENDOR" + ] + EOF + + - name: Construire avec cross et OpenSSL vendored + env: + OPENSSL_STATIC: 1 + RUSTFLAGS: "-C target-feature=+crt-static" + OPENSSL_NO_VENDOR: 0 + run: | + cross build --release --target x86_64-unknown-linux-musl --features vendored-openssl + + - name: Afficher des informations de débogage + run: | + echo "Acteur: ${{ github.actor }}" + echo "Référence de la branche: ${{ github.head_ref }}" + echo "Event name: ${{ github.event_name }}" \ No newline at end of file