Skip to content

Commit c9b5ea2

Browse files
authored
feat: add ci (#565)
1 parent 66991cd commit c9b5ea2

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/build.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build and Upload Artifact
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
name: Checkout code
21+
22+
- name: Install dependencies (Ubuntu)
23+
if: matrix.os == 'ubuntu-latest'
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y make
27+
shell: bash
28+
29+
- name: Install dependencies (macOS)
30+
if: matrix.os == 'macos-latest'
31+
run: |
32+
brew install make
33+
shell: bash
34+
35+
- name: Install dependencies (Windows)
36+
if: matrix.os == 'windows-latest'
37+
run: |
38+
choco install make
39+
shell: pwsh
40+
41+
- name: Build project
42+
run: make
43+
shell: bash
44+
45+
- name: Archive production artifacts (Linux)
46+
if: matrix.os == 'ubuntu-latest'
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: build-artifacts-linux
50+
path: bin/linux/genie
51+
52+
- name: Archive production artifacts (macOS)
53+
if: matrix.os == 'macos-latest'
54+
uses: actions/upload-artifact@v2
55+
with:
56+
name: build-artifacts-macos
57+
path: bin/darwin/genie
58+
59+
- name: Archive production artifacts (Windows)
60+
if: matrix.os == 'windows-latest'
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: build-artifacts-windows
64+
path: bin/windows/genie.exe

0 commit comments

Comments
 (0)