diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6baaaea --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,83 @@ +name: CI + +on: + push: + branches: [auto] + pull_request: + workflow_dispatch: + +jobs: + linux-ci: + name: Linux + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: ["stable", "beta", "nightly", "1.36.0"] + include: + - toolchain: stable + env: + DO_FUZZ: 1 + - toolchain: beta + env: + DO_FUZZ: 1 + steps: + - uses: actions/checkout@v2 + + - name: Install packages + run: sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.toolchain }} + override: true + + - name: Cargo build + run: cargo build --verbose + + - name: Cargo test + run: cargo test --verbose + + - name: Cargo test w/ serde + run: cargo test --verbose --features serde + + - name: Cargo check w/o default features + if: matrix.toolchain == 'nightly' + run: cargo check --verbose --no-default-features + + - name: Cargo test w/ union + if: matrix.toolchain == 'beta' + run: cargo test --verbose --features union + + - name: Cargo test all features + if: matrix.toolchain == 'nightly' + run: cargo test --verbose --all-features + + - name: Cargo bench + if: matrix.toolchain == 'nightly' + run: cargo bench --verbose bench + + - name: miri + if: matrix.toolchain == 'nightly' + run: bash ./scripts/run_miri.sh + + - name: fuzz + if: env.DO_FUZZ == '1' + working-directory: fuzz + run: ./travis_fuzz.sh + + build_result: + name: homu build finished + runs-on: ubuntu-latest + needs: + - "linux-ci" + + steps: + - name: Mark the job as successful + run: exit 0 + if: success() + - name: Mark the job as unsuccessful + run: exit 1 + if: "!success()" + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 32fba28..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: rust -addons: - apt: - update: true - packages: - - binutils-dev - - libunwind8-dev - - libcurl4-openssl-dev - - libelf-dev - - libdw-dev - - cmake - - gcc - - libiberty-dev -matrix: - include: - - rust: 1.36.0 - - rust: nightly - - rust: beta - env: DO_FUZZ=true - - rust: stable - env: DO_FUZZ=true -script: | - cargo build --verbose && - cargo test --verbose && - cargo test --verbose --features serde && - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) && - ([ $TRAVIS_RUST_VERSION != beta ] || cargo test --verbose --features union) && - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) && - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) && - ([ $TRAVIS_RUST_VERSION != nightly ] || bash ./scripts/run_miri.sh) && - if [ "$DO_FUZZ" = true ] - then - ( - cd fuzz - ./travis-fuzz.sh - ) - fi