-
Notifications
You must be signed in to change notification settings - Fork 39
125 lines (101 loc) · 3.95 KB
/
main.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
122
123
124
125
name: NTSC-Status
on:
push:
branches: master # Only trigger on master
paths-ignore: # Don't trigger on files that are updated by the CI or other non-breaking files
- 'tools/**'
- '*.md'
- '.github/**'
- '.gitignore'
- 'CppProperties.json'
pull_request:
branches: master # Only trigger on master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
changedfiles:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
all: ${{ steps.changes.outputs.all}}
steps:
# Make sure we have some code to diff.
- name: Checkout repository
uses: actions/checkout@v2
- name: Get changed files
id: changes
# Set outputs using the command.
run: |
echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)"
buildus:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# with:
# fetch-depth: 2
- name: Install Depedencies
run: |
sudo apt update
sudo apt install binutils-mips-linux-gnu make
wget https://github.com/n64decomp/qemu-irix/releases/download/v2.11-deb/qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb
sudo dpkg -i qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb
- name: Get precompiled recomp to save time
env:
IDO_RECOMP: ${{ secrets.FILE_RECOMP }}
run: |
wget -O recomp.zip $IDO_RECOMP
unzip -u recomp.zip -d tools/ido5.3_recomp
- name: Get US File
env:
FILE_US: ${{ secrets.SECRET_FILE_US }}
run: wget -O baserom.u.z64 $FILE_US
# cach is only usefull if downloading things takes longer than copying things - in this case, extraction is quicker
#- name: Cache Assets
# id: cache-assets
# uses: actions/cache@v3
# with:
# path: assets
# key: ${{ hashFiles('extract_baserom.u.sh') }}
- name: Extract US Assets
#if: steps.cache-assets.outputs.cache-hit != 'true'
run: ./extract_baserom.u.sh
- name: Make US
run: make -j IDO_RECOMP=YES VERSION=US VERBOSE=1
- name: Make report
run: make -C tools/report
# for refrence, these diff commands wont work in GHA, so, "Last modified file" will never work
# GHA makes new copies of all files (so modified date is all the same) and wont lok at logs (commands below)
#- name: difftest1
# run: git diff --name-only origin/master ${GITHUB_HEAD_REF}
#- name: difftest2
# run: git diff --name-only ${{ github.event.before }} ${{ github.sha }}
#- name: difftest3
# run: git diff --name-only -1
#- name: difftest4
# run: git diff --name-only @"{10 minutes ago}"
- name: Stats
run: python3 tools/ge-stats.py --version us --report
# expected args
# 1481 15854 12774 232276 564 1312 652 20330 15471 269772 49 336 tools/report/index.html "src/game/bondview.c"
# Replace this with Git push to repo
# but somehow avoid loop
#- uses: actions/download-artifact@v2
# with:
# name: my-artifact
# path: tools/report/index.html
- name: Upload output files
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
API_TOKEN_USER: ${{ secrets.API_TOKEN_USER }}
API_TOKEN_EMAIL: ${{ secrets.API_TOKEN_EMAIL }}
with:
destination_repo: 'kholdfuzion/goldeneyestatus'
user_email: $API_TOKEN_EMAIL
user_name: $API_TOKEN_USER
source_file: |
tools/report/cursor.cur
tools/report/index.html
tools/report/sfx.ogg
tools/report/background.jpg
#need way of telling report that JAP passed/failed