misc dep updates #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: CI | |
# lint all PRs, pushes to master, and tags | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
tags: | |
- "v*" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
profile: minimal | |
- name: Lint | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose | |
# this cannot be in its own file yet because the workflow-trigger-workflow | |
# pattern causes the github.ref to not have refs/tags | |
build: | |
# only build tagged versions | |
if: startsWith(github.ref, 'refs/tags') | |
# lint needs to pass first | |
needs: lint | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
artifact_name: markrust.exe | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
artifact_name: markrust | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
artifact_name: markrust | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
target: ${{ matrix.target }} | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --target ${{ matrix.target }} --release | |
- name: Prepend target to build artifact path for release | |
run: mv "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "target/${{ matrix.target }}/release/${{ matrix.target }}-${{ matrix.artifact_name }}" | |
- name: Upload release artifacts | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
prerelease: false | |
files: target/${{ matrix.target }}/release/${{ matrix.target }}-${{ matrix.artifact_name }} |