Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit 7cf11c3

Browse files
Merge #219
219: Replace CircleCI with GitHub actions r=D4nte a=thomaseizinger Work towards #105. With this PR, we do a debug build for each platform on every build. GitHub actions also allows us to download the artifact. Once the cache limit for GitHub actions is increased OR we strip down on some of our dependencies, we might also be able to use to the cache action to further speed up the build. Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2 parents fcf220e + e98a373 commit 7cf11c3

File tree

9 files changed

+128
-416
lines changed

9 files changed

+128
-416
lines changed

.circleci/config.yml

Lines changed: 0 additions & 127 deletions
This file was deleted.

.github/workflows/CI.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
on:
2+
push:
3+
branches-ignore:
4+
- 'staging.tmp'
5+
- 'trying.tmp'
6+
7+
name: CI
8+
9+
jobs:
10+
static_analysis:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout sources
14+
uses: actions/checkout@v1
15+
16+
- name: Extract toolchain version from rust-toolchain
17+
run: echo "::set-env name=RUST_TOOLCHAIN::$(cat rust-toolchain)"
18+
19+
- name: Install ${{ env.RUST_TOOLCHAIN }} toolchain
20+
uses: actions-rs/toolchain@v1
21+
with:
22+
profile: minimal
23+
toolchain: ${{ env.RUST_TOOLCHAIN }}
24+
override: true
25+
26+
- name: Check formatting
27+
run: make check_format
28+
29+
- name: Run linter
30+
run: make clippy
31+
32+
build:
33+
strategy:
34+
matrix:
35+
os: [macos, windows, ubuntu]
36+
include:
37+
- os: windows
38+
binary: create-comit-app.exe
39+
- os: ubuntu
40+
binary: create-comit-app
41+
- os: macos
42+
binary: create-comit-app
43+
runs-on: ${{ matrix.os }}-latest
44+
steps:
45+
- name: Checkout sources
46+
uses: actions/checkout@v1
47+
48+
- name: Extract toolchain version from rust-toolchain
49+
run: echo "::set-env name=RUST_TOOLCHAIN::$(cat rust-toolchain)"
50+
51+
- name: Install ${{ env.RUST_TOOLCHAIN }} toolchain
52+
uses: actions-rs/toolchain@v1
53+
with:
54+
profile: minimal
55+
toolchain: ${{ env.RUST_TOOLCHAIN }}
56+
override: true
57+
58+
- name: Build ${{ matrix.os }} binary
59+
run: make build
60+
61+
- name: Run unit tests
62+
run: make test
63+
64+
- name: Upload ${{ matrix.os }} binary
65+
uses: actions/upload-artifact@v1
66+
with:
67+
name: create-comit-app-${{ matrix.os }}-debug
68+
path: target/debug/${{ matrix.binary }}
69+
70+
e2e_test:
71+
runs-on: ubuntu-latest
72+
needs: build
73+
steps:
74+
- name: Checkout sources
75+
uses: actions/checkout@v1
76+
77+
- name: Download binary
78+
uses: actions/download-artifact@v1
79+
with:
80+
name: create-comit-app-ubuntu-debug
81+
path: target/debug
82+
83+
- name: Fix missing executable permission
84+
run: chmod +x target/debug/create-comit-app
85+
86+
- name: Install NodeJS 10.x
87+
uses: actions/setup-node@v1
88+
with:
89+
node-version: '10.x'
90+
91+
- name: Run e2e tests
92+
run: make e2e_scripts

.mergify.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
pull_request_rules:
22
- name: instruct bors to merge dependabot PRs with passing tests
33
conditions:
4-
- "status-success=ci/circleci: build_test"
5-
- "status-success=ci/circleci: static_analysis"
4+
- "status-success=static_analysis"
5+
- "status-success=build (macos)"
6+
- "status-success=build (windows)"
7+
- "status-success=build (ubuntu)"
8+
- "status-success=e2e_test"
69
- "author:dependabot-preview[bot]"
710
actions:
811
comment:
@@ -11,8 +14,11 @@ pull_request_rules:
1114
conditions:
1215
- "#approved-reviews-by>=2"
1316
- "#changes-requested-reviews-by=0"
14-
- "status-success=ci/circleci: build_test"
15-
- "status-success=ci/circleci: static_analysis"
17+
- "status-success=static_analysis"
18+
- "status-success=build (macos)"
19+
- "status-success=build (windows)"
20+
- "status-success=build (ubuntu)"
21+
- "status-success=e2e_test"
1622
- "status-success=license/cla"
1723
- -conflict
1824
- label!=work-in-progress

0 commit comments

Comments
 (0)