From 1c9905f6e2640fcb23eb5c0c8a9f49bb47525234 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Wed, 26 Feb 2020 18:04:17 -0800 Subject: [PATCH] Port GitHub workflows from master branch --- .github/workflows/ci.yml | 36 +++++++++++++++++++++ .github/workflows/release.yml | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..6ad5b6e1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + rust_version: [stable, "1.40.0"] + + steps: + - uses: actions/checkout@v1 + + - name: Setup Rust toolchain + run: rustup default ${{ matrix.rust_version }} + + - name: Build + run: cargo build --locked --verbose + + - name: Run tests + run: cargo test --locked --verbose + + - name: Rustfmt and Clippy + run: | + cargo fmt -- --check + cargo clippy + if: matrix.rust_version == 'stable' + + - name: Build (All Features) + run: cargo build --locked --verbose --all-features + + - name: Run tests (All Features) + run: cargo test --locked --verbose --all-features \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..779566c5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,60 @@ +name: Release + +on: + push: + tags: ["*"] + +jobs: + windows: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v1 + + - name: Build release binary + run: cargo build --verbose --locked --release + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: rojo-win64 + path: target/release/rojo.exe + + macos: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v1 + + - name: Install Rust + run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + + - name: Build release binary + run: | + source $HOME/.cargo/env + cargo build --verbose --locked --release + env: + OPENSSL_STATIC: 1 + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: rojo-macos + path: target/release/rojo + + linux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Build + run: cargo build --locked --verbose --release + env: + OPENSSL_STATIC: 1 + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: rojo-linux + path: target/release/rojo \ No newline at end of file