diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..bf9bb054 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,46 @@ +on: + push: + branches: [ github-actions ] + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +jobs: + linux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - run: rustup component add clippy + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: Run clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features + + windows: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - run: CALL "ci_extra\install_llvm.bat" + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + + mac: + runs-on: macos-latest + + steps: + - run: rustup component add rustfmt + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose diff --git a/ci_extra/install_llvm.bat b/ci_extra/install_llvm.bat new file mode 100644 index 00000000..8d963082 --- /dev/null +++ b/ci_extra/install_llvm.bat @@ -0,0 +1,4 @@ +@ECHO OFF + +curl -fsSL -o "LLVM-10.0.0-win64.exe" "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe" +LLVM-10.0.0-win64.exe /S \ No newline at end of file