-
Notifications
You must be signed in to change notification settings - Fork 30
143 lines (139 loc) · 4.87 KB
/
build-workflow.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Build Libraries
on:
push:
release:
types: [created]
env:
BASE_NAME: autoknit
NEST_LIBS_VERSION: v0.13
jobs:
build-windows:
name: Build (Windows)
runs-on: windows-latest
steps:
- uses: ilammy/msvc-dev-cmd@v1.4.1
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Libraries
shell: cmd
run: |
python .github/workflows/download-file.py https://github.com/15-466/nest-libs/releases/download/%NEST_LIBS_VERSION%/nest-libs-windows-%NEST_LIBS_VERSION%.zip ../nest-libs.zip
cd ..
"C:\Program Files\7-Zip\7z.exe" x -o. nest-libs.zip
- name: Build Code
shell: cmd
run: |
dir/w
#call "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
node Maekfile.js -q
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.BASE_NAME }}-windows
path: dist
- name: Package (Release)
if: github.event_name == 'release'
shell: cmd
run: |
rename dist "%BASE_NAME%-windows-%TAG_NAME%"
"C:\Program Files\7-Zip\7z.exe" a -r "%BASE_NAME%-windows-%TAG_NAME%.zip" "%BASE_NAME%-windows-%TAG_NAME%"
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Upload Result
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.BASE_NAME }}-windows-${{ github.event.release.tag_name }}.zip
asset_name: ${{ env.BASE_NAME }}-windows-${{ github.event.release.tag_name }}.zip
asset_content_type: application/zip
build-linux:
name: Build (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Libraries
shell: bash
run: |
cd ..
wget https://github.com/15-466/nest-libs/releases/download/${NEST_LIBS_VERSION}/nest-libs-linux-${NEST_LIBS_VERSION}.tar.gz -Onest-libs.tar.gz
tar xfz nest-libs.tar.gz
- name: Build Code
shell: bash
run: |
sudo apt-get update
sudo apt-get install libgl-dev libasound2-dev
ls
node Maekfile.js -q
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.BASE_NAME }}-linux
path: dist
- name: Package
if: github.event_name == 'release'
shell: bash
run: |
mv dist "$BASE_NAME""-linux-""$TAG_NAME"
tar cvfz "$BASE_NAME""-linux-""$TAG_NAME"".tar.gz" "$BASE_NAME""-linux-""$TAG_NAME"
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Upload Result
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.BASE_NAME }}-linux-${{ github.event.release.tag_name }}.tar.gz
asset_name: ${{ env.BASE_NAME }}-linux-${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip
build-macos:
name: Build (MacOS)
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Libraries
shell: bash
run: |
cd ..
wget https://github.com/15-466/nest-libs/releases/download/${NEST_LIBS_VERSION}/nest-libs-macos-${NEST_LIBS_VERSION}.tar.gz -Onest-libs.tar.gz
tar xfz nest-libs.tar.gz
- name: Build Code
shell: bash
run: |
ls
node Maekfile.js -q
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.BASE_NAME }}-macos
path: dist
- name: Package
if: github.event_name == 'release'
shell: bash
run: |
mv dist "$BASE_NAME""-macos-""$TAG_NAME"
tar cvfz "$BASE_NAME""-macos-""$TAG_NAME"".tar.gz" "$BASE_NAME""-macos-""$TAG_NAME"
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- name: Upload Result
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.BASE_NAME }}-macos-${{ github.event.release.tag_name }}.tar.gz
asset_name: ${{ env.BASE_NAME }}-macos-${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip