Add back local ci modifications

This commit is contained in:
Jon Gjengset 2022-09-18 12:54:53 -07:00
parent d2f4848f35
commit d91e506e76
4 changed files with 88 additions and 119 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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