-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (55 loc) · 1.45 KB
/
build.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: build
on:
push:
paths:
- '*.m'
- '*.c'
- '*.h'
- '.github/workflows/*'
- 'Makefile'
pull_request:
paths:
- '*.m'
- '*.c'
- '*.h'
- '.github/workflows/*'
- 'Makefile'
workflow_dispatch:
release:
types:
- created
jobs:
build-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: setup environment
run: |
echo "CC=xcrun -sdk iphoneos cc -arch arm64" >> $GITHUB_ENV
echo "STRIP=xcrun -sdk iphoneos strip" >> $GITHUB_ENV
echo "CFLAGS=-Os -flto=thin -miphoneos-version-min=12.0" >> $GITHUB_ENV
echo "LDFLAGS=-Os -flto=thin -miphoneos-version-min=12.0" >> $GITHUB_ENV
gh run download -R ProcursusTeam/ldid -n ldid_macos_x86_64
chmod +x ldid
echo "LDID=./ldid" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build
run: |
make -j$(sysctl -n hw.ncpu)
- uses: actions/upload-artifact@v1
with:
name: netctl
path: netctl
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: netctl
asset_name: netctl
asset_content_type: application/octet-stream