This repository has been archived by the owner on Apr 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
91 lines (91 loc) · 3.63 KB
/
build-gptk.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
name: Build GPTK
on:
workflow_dispatch:
push:
schedule:
- cron: "0 19 * * *"
jobs:
build_gptk:
name: Build GPTK
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tap homebrew-apple
run: brew tap whisky/apple http://github.com/Whisky-App/homebrew-apple
- name: Check cache for compiler
id: compiler-cache
uses: actions/cache@v4
with:
path: /usr/local/Cellar/game-porting-toolkit-compiler
key: game-porting-toolkit-compiler-0.1
- name: Install compiler
if: steps.compiler-cache.outputs.cache-hit != 'true'
run: |
brew install whisky/apple/game-porting-toolkit-compiler
- name: Save compiler to cache
if: steps.compiler-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: game-porting-toolkit-compiler-0.1
path: /usr/local/Cellar/game-porting-toolkit-compiler
- name: Relink compiler
if: steps.compiler-cache.outputs.cache-hit == 'true'
run: |
brew install whisky/apple/game-porting-toolkit-compiler
ln -s /usr/local/Cellar/game-porting-toolkit-compiler/0.1/ /usr/local/opt/game-porting-toolkit-compiler
- name: Install taps
run: brew install whisky/apple/game-porting-toolkit winetricks || true
- name: Trim Files
run: |
rm -rf $(brew --prefix game-porting-toolkit)/.brew
rm -rf $(brew --prefix game-porting-toolkit)/include
rm -rf $(brew --prefix game-porting-toolkit)/INSTALL_RECEIPT.json
rm -rf $(brew --prefix game-porting-toolkit)/share/man
find $(brew --prefix game-porting-toolkit)/bin -type f -not -name "wine64" -not -name "wine64-preloader" -not -name "wineserver" -delete
find $(brew --prefix game-porting-toolkit)/bin -type l -delete
- name: Make Libraries folder
run: |
mkdir -p Libraries/Wine
- name: Copy taps
run: |
cp -a $(brew --prefix game-porting-toolkit)/. Libraries/Wine/
cp -a $(brew --prefix winetricks)/bin/winetricks Libraries/
- name: Copy external deps
run: |
cp -a libs/. Libraries/Wine/lib/
- name: Copy DXVK
run: |
cp -a DXVK Libraries/
- name: Copy Version .plist
run: |
cp -a GPTKVersion.plist Libraries/
- name: Download verbs list
run: |
curl https://raw.githubusercontent.com/Winetricks/winetricks/master/files/verbs/all.txt -o Libraries/verbs.txt
- name: Install GPTK
run: |
ditto GPTK/redist/lib/ Libraries/Wine/lib/
ln -s ./external/libd3dshared.dylib Libraries/Wine/lib/libd3dshared.dylib
ln -s ./external/D3DMetal.framework Libraries/Wine/lib/D3DMetal.framework
- name: Tar Libraries
run: |
tar -zcf Libraries.tar.gz Libraries
- name: Upload Libraries
uses: actions/upload-artifact@v4
with:
name: Libraries
path: Libraries.tar.gz
- name: Upload Libraries to WhiskyBucket
env:
RCLONE_CONFIG_R2_TYPE: s3
RCLONE_CONFIG_R2_PROVIDER: Cloudflare
RCLONE_CONFIG_R2_ENV_AUTH: true
RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.RCLONE_ACCESS_KEY_ID }}
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.RCLONE_SECRET_ACCESS_KEY }}
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.RCLONE_ENDPOINT }}
run: |
brew install rclone
zip Libraries.zip Libraries.tar.gz
rclone copy Libraries.zip r2:whisky-bucket
rclone copy GPTKVersion.plist r2:whisky-bucket