Skip to content

Configure Renovate

Configure Renovate #38

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
tags:
- "v*.*.*"
env:
SQLX_OFFLINE: true
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-02-02
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v1
with:
cache-on-failure: true
- name: fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-02-02
override: true
components: clippy
- uses: Swatinem/rust-cache@v1
with:
cache-on-failure: true
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features --
create-release:
name: deploy
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
strategy:
matrix:
target:
[
aarch64-unknown-linux-gnu,
armv7-unknown-linux-gnueabihf,
i686-unknown-linux-gnu,
i686-unknown-linux-musl,
arm-unknown-linux-gnueabi,
x86_64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install dependencies
run: sudo apt-get install -y libssl-dev musl-tools
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-02-02
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build target
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
# TODO:
# strip target/${{ matrix.target }}/release/rust-ci
cd target/${{ matrix.target }}/release
tar czvf ../../../marvin-${{ matrix.target }}.tar.gz marvin
cd -
- name: Publish
uses: softprops/action-gh-release@v1
# TODO: if any of the build step fails, the release should be deleted.
with:
files: "marvin*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}