From d91e506e764f2c89108be7915196c85f2bde689d Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Sun, 18 Sep 2022 12:54:53 -0700 Subject: [PATCH] Add back local ci modifications --- .github/workflows/nostd.yml | 24 --------- .github/workflows/safety.yml | 86 --------------------------------- .github/workflows/scheduled.yml | 20 +++++++- .github/workflows/test.yml | 77 ++++++++++++++++++++++++++--- 4 files changed, 88 insertions(+), 119 deletions(-) delete mode 100644 .github/workflows/nostd.yml delete mode 100644 .github/workflows/safety.yml diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml deleted file mode 100644 index 409ae73..0000000 --- a/.github/workflows/nostd.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - push: - branches: [main] - pull_request: -name: no-std -jobs: - nostd: - runs-on: ubuntu-latest - name: ${{ matrix.target }} - strategy: - matrix: - target: [thumbv7m-none-eabi, aarch64-unknown-none] - steps: - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: ${{ matrix.target }} - - uses: actions/checkout@v3 - - name: cargo check - uses: actions-rs/cargo@v1 - with: - command: check - args: --target ${{ matrix.target }} --no-default-features diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml deleted file mode 100644 index 86fc9ee..0000000 --- a/.github/workflows/safety.yml +++ /dev/null @@ -1,86 +0,0 @@ -on: - push: - branches: [main] - pull_request: -name: safety -jobs: - sanitizers: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Install nightly - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - default: true - - run: | - # to get the symbolizer for debug symbol resolution - sudo apt install llvm - # to fix buggy leak analyzer: - # https://github.com/japaric/rust-san#unrealiable-leaksanitizer - sed -i '/\[features\]/i [profile.dev]' Cargo.toml - sed -i '/profile.dev/a opt-level = 1' Cargo.toml - cat Cargo.toml - name: Enable debug symbols - - name: cargo test -Zsanitizer=address - uses: actions-rs/cargo@v1 - with: - command: test - # only --lib --tests b/c of https://github.com/rust-lang/rust/issues/53945 - args: --lib --tests --all-features --target x86_64-unknown-linux-gnu - env: - ASAN_OPTIONS: "detect_odr_violation=0:detect_leaks=0" - RUSTFLAGS: "-Z sanitizer=address" - - name: cargo test -Zsanitizer=leak - if: always() - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --target x86_64-unknown-linux-gnu - env: - LSAN_OPTIONS: "suppressions=lsan-suppressions.txt" - RUSTFLAGS: "-Z sanitizer=leak" - miri: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - run: | - echo "NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV - - name: Install ${{ env.NIGHTLY }} - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ env.NIGHTLY }} - default: true - components: miri - - name: cargo miri test - uses: actions-rs/cargo@v1 - with: - command: miri - args: test - env: - MIRIFLAGS: "-Zmiri-tag-raw-pointers" - loom: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - - name: cargo test --test loom - uses: actions-rs/cargo@v1 - with: - command: test - args: --release --test loom - env: - LOOM_MAX_PREEMPTIONS: 2 - RUSTFLAGS: "--cfg loom" diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 20229ba..3e3a9d3 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -29,7 +29,15 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --locked --all-features --all-targets + args: --locked --features test-full-imap --all-targets + services: + cyrus_imapd: + image: outoforder/cyrus-imapd-tester:latest + ports: + - 3025:25 + - 3143:143 + - 3465:465 + - 3993:993 # https://twitter.com/alcuadrado/status/1571291687837732873 update: runs-on: ubuntu-latest @@ -59,6 +67,14 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --locked --all-features --all-targets + args: --locked --features test-full-imap --all-targets env: RUSTFLAGS: -D deprecated + services: + cyrus_imapd: + image: outoforder/cyrus-imapd-tester:latest + ports: + - 3025:25 + - 3143:143 + - 3465:465 + - 3993:993 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83645f8..0c9d53c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,9 +4,9 @@ on: pull_request: name: test jobs: - required: + greenmail: runs-on: ubuntu-latest - name: ubuntu / ${{ matrix.toolchain }} + name: ubuntu / ${{ matrix.toolchain }} / greenmail strategy: matrix: toolchain: [stable, beta] @@ -30,7 +30,54 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --locked --all-features --all-targets + args: --locked --all-targets + services: + greenmail: + image: greenmail/standalone:1.6.8 + ports: + - 3025:3025 + - 3110:3110 + - 3143:3143 + - 3465:3465 + - 3993:3993 + - 3995:3995 + env: + GREENMAIL_OPTS: "-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.verbose" + cyrus: + runs-on: ubuntu-latest + name: ubuntu / ${{ matrix.toolchain }} / cyrus + strategy: + matrix: + toolchain: [stable, beta] + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Install ${{ matrix.toolchain }} + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + default: true + - name: cargo generate-lockfile + if: hashFiles('Cargo.lock') == '' + uses: actions-rs/cargo@v1 + with: + command: generate-lockfile + # https://twitter.com/jonhoo/status/1571290371124260865 + - name: cargo test --locked + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked --features test-full-imap --all-targets + services: + cyrus_imapd: + image: outoforder/cyrus-imapd-tester:latest + ports: + - 3025:25 + - 3143:143 + - 3465:465 + - 3993:993 minimal: runs-on: ubuntu-latest name: ubuntu / stable / minimal-versions @@ -58,7 +105,15 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --locked --all-features --all-targets + args: --locked --features test-full-imap --all-targets + services: + cyrus_imapd: + image: outoforder/cyrus-imapd-tester:latest + ports: + - 3025:25 + - 3143:143 + - 3465:465 + - 3993:993 os-check: runs-on: ${{ matrix.os }} name: ${{ matrix.os }} / stable @@ -80,10 +135,10 @@ jobs: uses: actions-rs/cargo@v1 with: command: generate-lockfile - - name: cargo test + - name: cargo check uses: actions-rs/cargo@v1 with: - command: test + command: check args: --locked --all-features --all-targets coverage: runs-on: ubuntu-latest @@ -106,8 +161,16 @@ jobs: with: command: generate-lockfile - name: cargo llvm-cov - run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info + run: cargo llvm-cov --features test-full-imap --lcov --output-path lcov.info - name: Upload to codecov.io uses: codecov/codecov-action@v2 with: fail_ci_if_error: true + services: + cyrus_imapd: + image: outoforder/cyrus-imapd-tester:latest + ports: + - 3025:25 + - 3143:143 + - 3465:465 + - 3993:993