forked from ni/grpc-device
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.69 KB
/
create_client_artifacts.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
name: Create Client Artifacts
on:
workflow_call:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Artifacts", artifact: "Windows.tar.xz",
os: windows-latest,
}
- {
name: "Linux Artifacts", artifact: "Linux.tar.xz",
os: ubuntu-18.04,
}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup python3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install build dependencies
run: python -m pip install -r python_build_requirements.txt
- name: Stage Client Files
run: |
python source/codegen/stage_client_files.py -o ${{ runner.temp }}/staging/
- name: Tar Linux Client Files
if: ${{ (runner.os == 'Linux') }}
run: |
tar -cvzf ni-grpc-device-client.tar.gz -C ${{ runner.temp }}/staging/ .
- name: Upload Linux Client Files Artifact
uses: actions/upload-artifact@v2
if: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases')) && (runner.os == 'Linux') }}
with:
name: ni-grpc-device-client-Linux
path: ni-grpc-device-client.tar.gz
retention-days: 5
- name: Upload Windows Client Files Artifact
uses: actions/upload-artifact@v2
if: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases')) && (runner.os == 'Windows') }}
with:
name: ni-grpc-device-client
path: |
${{ runner.temp }}/staging
retention-days: 5