-
-
Notifications
You must be signed in to change notification settings - Fork 45
67 lines (63 loc) · 2.09 KB
/
tip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Continuous master build
on:
push:
branches:
- master
jobs:
clippy:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: clippy
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
arch:
- { name: 'x86_64', os: 'ubuntu-latest', target: 'x86_64-unknown-linux-gnu', cross: false }
- { name: 'i686', os: 'ubuntu-latest', target: 'i686-unknown-linux-gnu', cross: true }
- { name: 'armv7h', os: 'ubuntu-latest', target: 'armv7-unknown-linux-gnueabihf', cross: true }
- { name: 'aarch64', os: 'ubuntu-latest', target: 'aarch64-unknown-linux-gnu', cross: true }
runs-on: ${{ matrix.arch.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: target/
key: cargo-cache-${{ matrix.arch.target }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target=${{ matrix.arch.target }}
use-cross: ${{ matrix.arch.cross }}
- name: Rename artifact
run: mv target/${{ matrix.arch.target }}/release/tuigreet target/${{ matrix.arch.target }}/release/tuigreet-tip-${{ matrix.arch.name }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: tuigreet-tip-${{ matrix.arch.name }}
path: target/${{ matrix.arch.target }}/release/tuigreet-tip-${{ matrix.arch.name }}
package:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: target/out
- name: Create release
uses: eine/tip@tip
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: target/out/*/*
rm: true