-
Notifications
You must be signed in to change notification settings - Fork 16
156 lines (142 loc) · 5.63 KB
/
macos.yml
File metadata and controls
156 lines (142 loc) · 5.63 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
name: macOS
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-x64:
runs-on: macOS-13
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.13.5'
- name: Setup env
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
echo "SCCACHE_BUCKET=sccache" >> $GITHUB_ENV
echo "SCCACHE_ENDPOINT=http://robdangero.us:9000" >> $GITHUB_ENV
echo "SCCACHE_REGION=auto" >> $GITHUB_ENV
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
- name: Brew
run: |
brew install sccache llvm@20
echo "$(brew --prefix llvm@20)/bin" >> $GITHUB_PATH
- name: Build
env:
SCCACHE_GHA_ENABLED: "true"
run: |
export CC="sccache clang"
export CXX="sccache clang++"
export CFLAGS="$CFLAGS -w"
export CXXFLAGS="$CXXFLAGS -w"
./configure --openssl-no-asm --without-intl --dest-cpu=x64 --ninja
make
strip ./out/Release/node
codesign --sign - --timestamp --force ./out/Release/node
sccache --show-stats
- name: Get KoreTools_macos_x64
run: git clone https://github.com/Kode/KoreTools_macos_x64.git
- name: Copy binary
run: cp out/Release/node KoreTools_macos_x64/kmake
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "robbot2019@robdangero.us"
- name: Add binary
run: git -C KoreTools_macos_x64 add .
- name: Commit binary
id: commit
continue-on-error: true
run: git -C KoreTools_macos_x64 commit -a -m "Update kmake binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KoreTools_macos_x64 tag kmake_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KoreTools_macos_x64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_macos_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KoreTools_macos_x64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KoreTools_macos_x64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_macos_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
build-arm64:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.13.5'
- name: Setup env
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> $GITHUB_ENV
echo "SCCACHE_BUCKET=sccache" >> $GITHUB_ENV
echo "SCCACHE_ENDPOINT=http://robdangero.us:9000" >> $GITHUB_ENV
echo "SCCACHE_REGION=auto" >> $GITHUB_ENV
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: Brew
run: brew install sccache
- name: Build
env:
SCCACHE_GHA_ENABLED: "true"
run: |
export CC="sccache clang"
export CXX="sccache clang++"
export CFLAGS="$CFLAGS -w"
export CXXFLAGS="$CXXFLAGS -w"
./configure --openssl-no-asm --without-intl --dest-cpu=arm64 --ninja
make
strip ./out/Release/node
codesign --sign - --timestamp --force ./out/Release/node
sccache --show-stats
- name: Get KoreTools_macos_arm64
run: git clone https://github.com/Kode/KoreTools_macos_arm64.git
- name: Copy binary
run: cp out/Release/node KoreTools_macos_arm64/kmake
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "robbot2019@robdangero.us"
- name: Add binary
run: git -C KoreTools_macos_arm64 add .
- name: Commit binary
id: commit
continue-on-error: true
run: git -C KoreTools_macos_arm64 commit -a -m "Update kmake binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KoreTools_macos_arm64 tag kmake_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KoreTools_macos_arm64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_macos_arm64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KoreTools_macos_arm64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KoreTools_macos_arm64 push https://Kode-Robbot:$ROBBOT_PASS@github.com/Kode/KoreTools_macos_arm64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}