-
Notifications
You must be signed in to change notification settings - Fork 55
121 lines (118 loc) · 4.13 KB
/
saturn-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
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
name: Build Saturn version
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- '**/*.md'
pull_request_target:
paths-ignore:
- '*.md'
- '**/*.md'
workflow_dispatch:
jobs:
build-and-test-saturn:
# Building and testing cannot work if the repository owner is not Xeeynamo
# due to the missing secrets to clone the game's data repository
if: github.repository == 'Xeeynamo/sotn-decomp'
runs-on: ubuntu-latest
steps:
- name: Clone main repo (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: false
- name: Clone main repo
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Clone dependencies
uses: actions/checkout@v4
with:
repository: xeeynamo/sotn-decomp-dependencies
ref: saturn
token: ${{ secrets.SOTN_DECOMP_DEPENDENCIES_TOKEN }}
path: 'disks/dependencies'
- name: Setting up dependencies
working-directory: disks
run: cat dependencies/* | tar -zxf -
- name: Install bchunk 7zip
run: |
sudo apt-get install p7zip-full bchunk binutils-sh-elf
- name: Install dosemu
run: |
git clone https://github.com/sozud/dosemu-deb.git
cd dosemu-deb
sudo apt-get install xfonts-utils
sudo dpkg -i fdpp_1.6-1_amd64.deb
sudo dpkg -i fdpp-dev_1.6-1_amd64.deb
sudo dpkg -i comcom32_0.1~alpha3-1_all.deb
sudo dpkg -i dosemu2_2.0~pre9-1_amd64.deb
- name: Extract dependencies
run: VERSION=saturn make extract_disk
- name: Extract asm
run: VERSION=saturn make extract
- name: Build saturn binaries
run: make build_saturn
- name: Check saturn
run: VERSION=saturn make check
function-finder-saturn:
if: github.repository == 'Xeeynamo/sotn-decomp' && github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Clone main repo (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: false
- name: Clone main repo
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Clone dependencies
uses: actions/checkout@v4
with:
repository: xeeynamo/sotn-decomp-dependencies
ref: saturn
token: ${{ secrets.SOTN_DECOMP_DEPENDENCIES_TOKEN }}
path: 'disks/dependencies'
- name: Setting up dependencies
working-directory: disks
run: cat dependencies/* | tar -zxf -
- name: Install bchunk 7zip
run: |
sudo apt-get install p7zip-full bchunk binutils-sh-elf
- name: Extract dependencies
run: VERSION=saturn make extract_disk
- name: Extract asm
run: VERSION=saturn make extract
- name: Clone asset repository
uses: actions/checkout@v4
with:
ref: 'gh-functions-saturn'
path: 'gh-functions-saturn'
- name: Set-up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install secondary pre-requirements
run: |
python3 -m venv .venv
.venv/bin/pip install requests tabulate
- name: Generate duplicates and function report
run: .venv/bin/python3 tools/function_finder/function_finder_saturn.py > gh-functions-saturn/functions_saturn.md
- name: Commit all reports
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add -A
git commit -m 'Update reports' || true
git push
working-directory: gh-functions-saturn