diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..90cf330 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4 +*.fixed linguist-language=Rust diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..4bc6481 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,62 @@ +name: Rust + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + default-features: + strategy: + matrix: + rust: ["stable", "beta", "nightly"] + os: [windows-latest, ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + + - name: Run tests + run: cargo test + + - name: Run test-project tests + run: cd test-project && cargo test + + + rustc-nightly-feature: + strategy: + matrix: + os: [windows-latest, ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - name: Add rustc-dev component + run: rustup component add rustc-dev + + - name: Run tests + run: cargo +nightly build --features rustc + + - name: Run test-project tests with `rustc` feature + run: cd test-project && cargo +nightly test --features rustc + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 794058f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: rust -matrix: - include: - - rust: nightly - env: FEATURES="--features rustc" - before_script: - rustup component add rustc-dev - - rust: beta - env: FEATURES="" - - rust: stable - env: FEATURES="" - - rust: nightly - env: FEATURES="" - -script: - - cargo test $FEATURES - - cd test-project && cargo test $FEATURES - -notifications: - email: - - pmunksgaard@gmail.com - - laumann.thomas@gmail.com diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ca321fd..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ -environment: - matrix: - - TARGET: x86_64-pc-windows-gnu - CHANNEL: nightly - - TARGET: x86_64-pc-windows-msvc - CHANNEL: nightly - -install: - - curl -sSf -o rustup-init.exe https://win.rustup.rs - - rustup-init.exe --default-host %TARGET% --default-toolchain %CHANNEL% -y - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin;C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin - - if %CHANNEL%==nightly (rustup component add rustc-dev) else (true) - - gcc --version - - rustc -Vv - - cargo -V - -build: false - -test_script: - - if %CHANNEL%==nightly (cargo build --features rustc) else (cargo build) - - cd test-project && if %CHANNEL%==nightly (cargo test --features rustc) else (cargo test) - -branches: - only: - - master