diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 1a6d6dc4d4..3625f6c283 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1,73 +1,83 @@ -name: Build and Test - -on: - push: - branches: [ main, dev ] - pull_request: - branches: [ main, dev ] - -env: - CARGO_TERM_COLOR: always - -jobs: - lint: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Cache cargo registry - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: clippy-cargo-${{ hashFiles('**/Cargo.toml') }} - - name: Add clippy - run: rustup component add clippy - - name: Run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all - ubuntu: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Default Build - run: cargo build --verbose - - name: Default Test - run: cargo test --verbose - - name: Build all features - run: cd libafl && cargo build --all-features --verbose - - name: Test all features - run: cd libafl && cargo test --all-features --verbose - - name: Build no_std - run: cd libafl && cargo build --no-default-features --verbose - - name: Test no_std - run: cd libafl && cargo test --no-default-features --verbose - - name: Build examples - run: cargo build --examples --verbose - - uses: actions/checkout@v2 - - name: Format - run: cargo fmt -- --check - - uses: actions/checkout@v2 - - name: Build Docs - run: cargo doc - - name: Test Docs - run: cargo test --doc - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Windows Build - run: cargo build --verbose - # TODO: Figure out how to properly build stuff with clang - #- name: Add clang path to $PATH env - # if: runner.os == 'Windows' - # run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 - #- name: Try if clang works - # run: clang -v - #- name: Windows Test - # run: C:\Rust\.cargo\bin\cargo.exe test --verbose +name: Build and Test + +on: + push: + branches: [ main, dev ] + pull_request: + branches: [ main, dev ] + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Cache cargo registry + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: clippy-cargo-${{ hashFiles('**/Cargo.toml') }} + - name: Add clippy + run: rustup component add clippy + #- name: Run clippy + # uses: actions-rs/cargo@v1 + # with: + # command: clippy + # args: --all + + ubuntu: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Default Build + run: cargo build --verbose + - name: Default Test + run: cargo test --verbose + - name: Build all features + run: cd libafl && cargo build --all-features --verbose + - name: Test all features + run: cd libafl && cargo test --all-features --verbose + - name: Build no_std + run: cd libafl && cargo build --no-default-features --verbose + - name: Test no_std + run: cd libafl && cargo test --no-default-features --verbose + - name: Build examples + run: cargo build --examples --verbose + - uses: actions/checkout@v2 + - name: Format + run: cargo fmt -- --check + - uses: actions/checkout@v2 + - name: Build Docs + run: cargo doc + - name: Test Docs + run: cargo test --doc + - name: Run clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Windows Build + run: cargo build --verbose + - name: Run clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + # TODO: Figure out how to properly build stuff with clang + #- name: Add clang path to $PATH env + # if: runner.os == 'Windows' + # run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 + #- name: Try if clang works + # run: clang -v + #- name: Windows Test + # run: C:\Rust\.cargo\bin\cargo.exe test --verbose