Skip to content

Commit 51d36d4

Browse files
committed
fuck apple
1 parent b01a296 commit 51d36d4

File tree

2 files changed

+83
-32
lines changed

2 files changed

+83
-32
lines changed

.github/workflows/build-linux.yml

Lines changed: 82 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,53 @@ jobs:
2525
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
28-
token: ${{ secrets.GH_TOKEN }}
28+
token: ${{ secrets.GH_TOKEN }}
2929

30-
- name: Compile function
30+
31+
- name: Set up Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '23'
35+
36+
37+
- name: Patch specific dependencies from package.json
38+
run: |
39+
node <<'EOF'
40+
const fs = require('fs');
41+
const path = './package.json';
42+
43+
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'));
44+
45+
const depsToRemove = [
46+
"dmg-license",
47+
"electron-trackpad-utils"
48+
];
49+
50+
['dependencies', 'devDependencies'].forEach(section => {
51+
if (pkg[section]) {
52+
depsToRemove.forEach(dep => {
53+
delete pkg[section][dep];
54+
});
55+
}
56+
});
57+
58+
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n');
59+
EOF
60+
61+
- name: Install dependencies
62+
run: npm install
63+
64+
- name: Bundle
3165
env:
3266
WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAM_LICENSE_ENTITLEMENT_ID }}
3367
run: |
34-
wolframscript -script ./Scripts/BuildLibrary.wls /usr/include/ /usr/lib/x86_64-linux-gnu/libuv.so
68+
npm run pre-dist
69+
70+
- name: Build electron
71+
env:
72+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
73+
run: npm run dist-linux86
3574

36-
- name: Commit files
37-
run: |
38-
git config pull.rebase false
39-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
40-
git config --local user.name "github-actions[bot]"
41-
git add LibraryResources/
42-
git add UV/
43-
git commit -m "Add binary for ${{ env.WOLFRAM_SYSTEM_ID }}"
44-
git pull
45-
git push
4675

4776
build-ARM:
4877
runs-on: ubuntu-24.04-arm
@@ -52,7 +81,7 @@ jobs:
5281
WOLFRAMENGINE_INSTALLATION_DIRECTORY: "/Applications/Wolfram Engine.app"
5382
steps:
5483
- name: Check out repository
55-
uses: actions/checkout@v2
84+
uses: actions/checkout@v4
5685
with:
5786
token: ${{ secrets.GH_TOKEN }}
5887

@@ -64,25 +93,47 @@ jobs:
6493
sudo apt install libuv1-dev -y
6594
6695
67-
- name: Compile function
96+
- name: Set up Node.js
97+
uses: actions/setup-node@v4
98+
with:
99+
node-version: '23'
100+
101+
102+
- name: Patch specific dependencies from package.json
103+
run: |
104+
node <<'EOF'
105+
const fs = require('fs');
106+
const path = './package.json';
107+
108+
const pkg = JSON.parse(fs.readFileSync(path, 'utf8'));
109+
110+
const depsToRemove = [
111+
"dmg-license",
112+
"electron-trackpad-utils"
113+
];
114+
115+
['dependencies', 'devDependencies'].forEach(section => {
116+
if (pkg[section]) {
117+
depsToRemove.forEach(dep => {
118+
delete pkg[section][dep];
119+
});
120+
}
121+
});
122+
123+
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n');
124+
EOF
125+
126+
- name: Install dependencies
127+
run: npm install
128+
129+
- name: Bundle
68130
env:
69131
WOLFRAMSCRIPT_ENTITLEMENTID: ${{ secrets.WOLFRAM_LICENSE_ENTITLEMENT_ID }}
70132
run: |
71-
/opt/Wolfram/WolframEngine/14.1/SystemFiles/Kernel/Binaries/Linux-ARM64/wolframscript -debug -verbose -script ./Scripts/BuildLibrary.wls /usr/include /usr/lib/aarch64-linux-gnu/libuv.so
133+
/opt/Wolfram/WolframEngine/14.1/SystemFiles/Kernel/Binaries/Linux-ARM64/wolframscript -debug -verbose -script ./Scripts/bundle.wls
72134
73135
74-
- name: Commit files
75-
run: |
76-
git config pull.rebase true
77-
git fetch
78-
git pull
79-
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
80-
git config --local user.name "github-actions[bot]"
81-
git add LibraryResources/
82-
git add UV/
83-
git commit -m "Add binary for ${{ env.WOLFRAM_SYSTEM_ID }}"
84-
- name: Push changes
85-
uses: ad-m/github-push-action@master
86-
with:
87-
github_token: ${{ secrets.GH_TOKEN }}
88-
branch: ${{ github.ref }}
136+
- name: Build electron
137+
env:
138+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
139+
run: npm run dist-linux

.github/workflows/build-mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
- name: Set up Node.js
126126
uses: actions/setup-node@v4
127127
with:
128-
node-version: '23' # or '25', etc.
128+
node-version: 'latest' # or '25', etc.
129129
architecture: 'x86'
130130

131131
- name: Verify Node.js

0 commit comments

Comments
 (0)