From 34ab744f4f8ee05a5dc8be07914a29d2f47b227f Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Sun, 18 Apr 2021 13:18:18 -0700 Subject: [PATCH] Add GitHub CI config. --- .github/workflows/rust.yml | 64 +++++++++++++++++++++++++++++++++ fuzz/smoketest/ion_checker.bin | Bin 0 -> 2779 bytes 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/rust.yml create mode 100644 fuzz/smoketest/ion_checker.bin diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..8081fdc --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,64 @@ +# Derived from regalloc.rs' GitHub CI config file. + +name: Rust + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + # Lint code with rustfmt, report an error if it needs to be run. + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install rustfmt + run: rustup component add rustfmt + - name: Run rustfmt and check there's no difference + run: cargo fmt --all -- --check + + # Make sure the code compiles and that all the tests pass. + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build + - name: Run tests + run: cargo test --all --verbose + + # Lint dependency graph for security advisories, duplicate versions, and + # incompatible licences. + cargo_deny: + name: Cargo deny + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - run: | + set -e + curl -L https://github.com/EmbarkStudios/cargo-deny/releases/download/0.8.5/cargo-deny-0.8.5-x86_64-unknown-linux-musl.tar.gz | tar xzf - + mv cargo-deny-*-x86_64-unknown-linux-musl/cargo-deny cargo-deny + echo `pwd` >> $GITHUB_PATH + - run: cargo deny check + + # Builds the fuzz targets. + fuzz: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install nightly + run: rustup toolchain install nightly + - name: Install cargo-fuzz + run: cargo +nightly install cargo-fuzz + - name: Build ssagen fuzzing target + run: cargo +nightly fuzz build ssagen + - name: Build moves fuzzing target + run: cargo +nightly fuzz build moves + - name: Build ion fuzzing target + run: cargo +nightly fuzz build ion + - name: Build and smoke-test ion_checker fuzzing target + run: cargo +nightly fuzz run ion_checker ./fuzz/smoketest/ion_checker.bin diff --git a/fuzz/smoketest/ion_checker.bin b/fuzz/smoketest/ion_checker.bin new file mode 100644 index 0000000000000000000000000000000000000000..5156f22792d0392e0b66617f2e8702bcd4a5d798 GIT binary patch literal 2779 zcmd^BJ!q3b7=A8jTQihEOGt*$7JphTmUeKdgMyPw5f{NK$>*R$7iY;5x;XeV1ph!! zM8PT2DSHstf>Y-&LqV_zQb|n<=li~Q_vK5QPirbD_(1Nx_wL@GyWID@ha3!Jlzs!4 z10y}m&AJJIb&q-9A(>}rV3`-!7#q^=ZIZ@iWg`s3mbZB)9Vje(To6oPBt3s;`L$6O z-r^($(yLnEG^Xrhddo;+2pA`yVHgc{cMz`0bl7Os$cyaT)M^(6mj&0n#U3XcZU$l4 z;1D)*KkCiAOd6MYw(oD_l(oe)od*V2%jI$#N?W|t`nq0nN+hPDp4Jsj|C+-hpuW)= zKvfANYdhxEee-?@emQWPVracT`|6b)bC1n|(j;c<^*V={kXT9%8kkG7??D;ExD~)- z9(=^jQLUe`)aedHk2RPjJEzYm1(V9>*?lwX{51(ku`(<;^5F{)b+8f`c=<-<$H54tmk{o0g!B#S6nTJH7;?C0;_ebACk zueASM*8kq^>TLQyzFl8?-mVp*_t+Io`Vh3f5d^nl3vG9cs3b>x>#k&bI|%r!Hy1Z8 zmaMqsR1v(On|7*1J473IotHyQ9%t%AlKpY{vHrN+ad8r7CyoD{%XwB<{+HG4x4vpV z!wxA6vl55%*ulu%6ZXTu312B@)6tpq)8W(T&3;d4ri-*UY^h<3IQGHWJ~3-1W#c*f z#yQ{=PY$336znsja=KV7jundvDl=0WJ*z%vG8y--p=S-3WqC|_r_;Uy#*>nDN%b%O zfg*LD9L0(WX^D^s6&-(R(Ze8z!(_qrJ92z*zHm9Tx8F!m;fmO^(se%-5Cq12#}q+K Z#(-=oV1iNZV$eH70U7IX()ryjegJnaJ^=s# literal 0 HcmV?d00001