Skip to content

Commit

Permalink
Move new CI to main branch (#1)
Browse files Browse the repository at this point in the history
* Update CI
* Add new README.md badges
* Change debug colors

Co-authored-by: Radosław Stępień <[email protected]>
  • Loading branch information
zeerooth and Radosław Stępień authored Nov 29, 2020
1 parent 387b9ba commit cdc3ca1
Show file tree
Hide file tree
Showing 5 changed files with 264 additions and 127 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/rust.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: Release

on:
push:
Expand Down Expand Up @@ -28,7 +28,8 @@ jobs:

- name: Set the version
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
shell: bash

- name: Build
run: cargo build --release --locked
Expand All @@ -37,20 +38,18 @@ jobs:
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: strip target/release/qurl

- name: Upload binaries to release (Linux/MacOS)
uses: svenstaro/upload-release-action@v1-release
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/qurl
asset_name: qurl-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}
tag: ${{ github.ref }}

- name: Upload binaries to release (Windows)
- name: Package
shell: bash
run: |
case ${{ matrix.target }} in
*-windows-*) cp target/release/qurl.exe ./qurl.exe; 7z -y a 'qurl-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip' 'qurl.exe' 'README.md' 'LICENSE' | tail -2 ;;
*) cp target/release/qurl ./qurl; zip 'qurl-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip' 'qurl' 'README.md' 'LICENSE' ;;
esac;
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: matrix.os == 'windows-latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/qurl.exe
asset_name: qurl-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.exe
file: qurl-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
asset_name: qurl-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
tag: ${{ github.ref }}
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on: push

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Build
run: cargo build --release --locked

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
args: '--out Lcov'

- name: Upload coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
Loading

0 comments on commit cdc3ca1

Please sign in to comment.