From 4444bdda804b624922e65cd888fbcf2cfb783a7e Mon Sep 17 00:00:00 2001 From: RKennedy9064 Date: Thu, 12 Mar 2020 12:13:08 -0500 Subject: [PATCH] Create rust.yml --- .github/workflows/rust.yml | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..88aba19 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,64 @@ +name: Build + +on: + push: + branches: + - 'master' + tags: + - '*' + schedule: + - cron: '40 4 * * *' # every day at 4:40 + pull_request: + +jobs: + test: + name: "Test" + + strategy: + matrix: + platform: [ + ubuntu-latest, + macos-latest, + windows-latest + ] + + runs-on: ${{ matrix.platform }} + timeout-minutes: 15 + + steps: + - name: "Checkout Repository" + uses: actions/checkout@v1 + + - name: Install Rustup + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly + echo ::add-path::$HOME/.cargo/bin + if: runner.os == 'macOS' + + - name: Set Rustup profile to minimal + run: rustup set profile minimal + + - name: "Print Rust Version" + run: | + rustc -Vv + cargo -Vv + - name: "Run cargo build" + run: cargo build + + - name: "Run cargo test" + run: cargo test + + - name: "Run cargo doc" + run: cargo doc + + - name: 'Deny Warnings' + run: cargo rustc -- -D warnings + + check_formatting: + name: "Check Formatting" + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - uses: actions/checkout@v1 + - run: rustup install nightly + - run: cargo +nightly fmt -- --check