From c908559673be8428e05d5bf035a615796bd0d6e8 Mon Sep 17 00:00:00 2001 From: commial Date: Sat, 5 Aug 2023 15:40:58 +0200 Subject: [PATCH 1/6] [TO REMOVE] run only binding windows test --- .github/workflows/test.yml | 131 ------------------------------------- 1 file changed, 131 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2755baf..8726dafc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,76 +13,6 @@ env: CARGO_TERM_COLOR: always jobs: - build: - strategy: - matrix: - build: [linux, macos, windows] - include: - - build: linux - os: ubuntu-latest - - build: macos - os: macos-latest - - build: windows - os: windows-latest - extension: .exe - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Build - env: - RUSTFLAGS: -D warnings - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --all --exclude mla-fuzz-afl --verbose - - name: Run tests - run: cargo test --all --exclude mla-fuzz-afl --release --verbose - - name: Upload resulting 'mlar' - uses: actions/upload-artifact@v1 - with: - name: ${{ matrix.build }} - path: ./target/release/mlar${{ matrix.extension }} - - long-tests: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Run long tests - run: cd mla && cargo test --release -- --ignored - - all-features: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Run long tests - run: cargo test --all-features --all --exclude mla-fuzz-afl --exclude mla-bindings-c --release - - test-bindings-c-cpp-linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Run C bindings tests on Linux - working-directory: bindings/C/tests/linux-gcc-g++/ - run: make CC=gcc - - name: Run C bindings tests on Linux - working-directory: bindings/C/tests/linux-gcc-g++/ - run: make CC=g++ test-bindings-c-cpp-windows: strategy: @@ -117,64 +47,3 @@ jobs: working-directory: bindings/C/tests/windows-msvc/ run: ./${{ matrix.msvc_platform }}/${{ matrix.version }}/mla-bindings-test.exe - afl-build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install dependencies - run: sudo apt-get install llvm - - name: Install cargo-afl binary crate - uses: actions-rs/install@v0.1 - with: - crate: afl - version: latest - use-tool-cache: true - - name: Test AFL build - env: - RUSTFLAGS: -D warnings - run: cargo afl build - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: rustfmt - - name: Check format - run: cargo fmt --all -- --check - - audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Security audit - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - - name: Install dependencies - run: sudo apt-get install llvm - - name: Install cargo-afl binary crate - uses: actions-rs/install@v0.1 - with: - crate: afl - version: latest - use-tool-cache: true - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets -- -D warnings From e8530f4049e8930dbf7280220397f8846eb87987 Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Fri, 11 Aug 2023 22:17:58 +0200 Subject: [PATCH 2/6] CI: Force 1.69 toolchain in bindings due to cargo regression in 1.70 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8726dafc..69dcc7b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.69 target: ${{ matrix.target }} - uses: microsoft/setup-msbuild@v1.0.2 - name: Compile C/CPP bindings test program for Windows From 230fae539170aa209ba58c480cb4e56b702593e3 Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Fri, 11 Aug 2023 22:24:44 +0200 Subject: [PATCH 3/6] restrict workflow launched --- .github/workflows/bench.yml | 21 ----------- .github/workflows/sanitize.yml | 65 ---------------------------------- 2 files changed, 86 deletions(-) delete mode 100644 .github/workflows/bench.yml delete mode 100644 .github/workflows/sanitize.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml deleted file mode 100644 index 21233183..00000000 --- a/.github/workflows/bench.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Benchmark PR - -permissions: - contents: read - pull-requests: write - -on: - pull_request: - branches: [ master ] - -jobs: - runBenchmark: - name: Criterion benchmark - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: boa-dev/criterion-compare-action@v3 - with: - branchName: ${{ github.base_ref }} - benchName: "bench_archive" - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml deleted file mode 100644 index 20700d18..00000000 --- a/.github/workflows/sanitize.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Ensure repository healthy state over time - -permissions: - contents: read - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always - -jobs: - bindings-headers-sync: - # Assert .h and .hpp bindings files are the ones generated - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: actions-rs/cargo@v1 - with: - command: install - args: cbindgen - - name: Test C header - working-directory: bindings/C - run: cbindgen --config cbindgen_c.toml | diff - mla.h - - name: Test C++ header - working-directory: bindings/C - run: cbindgen --config cbindgen_cpp.toml | diff - mla.hpp - - changelog-format: - # Ensure CHANGELOGs respect the KeepAChangelog format - strategy: - matrix: - changelog: [curve25519-parser, mla, mlar] - include: - - changelog: curve25519-parser - path: curve25519-parser - - changelog: mla - path: mla - - changelog: mlar - path: mlar - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Get ${{ matrix.changelog }} Changelog Entry - uses: mindsers/changelog-reader-action@v2 - id: changelog_reader - with: - # Check format for the last 10 entries - validation_depth: 10 - path: ${{ matrix.path }}/CHANGELOG.md - - name: Information - run: | - echo -e "\e[1mVersion\e[0m ${{ steps.changelog_reader.outputs.version }}" - echo -e "\e[1mStatus\e[0m ${{ steps.changelog_reader.outputs.status }}" - echo -en "\e[1mBody\e[0m" - cat << 'EOF' - ${{ steps.changelog_reader.outputs.changes }} - EOF From bf737ff80580c2a81010699459b365441dbd4bab Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Fri, 11 Aug 2023 22:24:54 +0200 Subject: [PATCH 4/6] Force 1.69 --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69dcc7b8..684ed64c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,6 +38,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: 1.69 + default: true target: ${{ matrix.target }} - uses: microsoft/setup-msbuild@v1.0.2 - name: Compile C/CPP bindings test program for Windows From b704dd7ee063b530ea75732a2a6d865695ab587a Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Fri, 11 Aug 2023 22:32:38 +0200 Subject: [PATCH 5/6] Test with 1.70 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 684ed64c..62ba8176 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.69 + toolchain: 1.70 default: true target: ${{ matrix.target }} - uses: microsoft/setup-msbuild@v1.0.2 From 42aa4392d4f0d17e0281641103c53bf9f9f2cfe5 Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Fri, 11 Aug 2023 22:34:53 +0200 Subject: [PATCH 6/6] Force 1.70.0 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62ba8176..89975e9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.70 + toolchain: 1.70.0 default: true target: ${{ matrix.target }} - uses: microsoft/setup-msbuild@v1.0.2