-
Notifications
You must be signed in to change notification settings - Fork 128
108 lines (102 loc) · 4.13 KB
/
yuzu.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
name: 'yuzu'
run-name: 'Build yuzu'
on:
workflow_dispatch:
jobs:
build-msvc:
name: 'build (windows, msvc)'
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
repository: yuzu-emu/yuzu
submodules: recursive
fetch-depth: 0
- name: Configure git
run: |
git config --global user.email "yuzu@yuzu-emu.org"
git config --global user.name "yuzubot"
git config --global pull.rebase true
git config --global rebase.autoStash true
git config --global fetch.prune true
- name: Install dependencies
# due to how chocolatey works, only cmd.exe is supported here
shell: cmd
run: |
choco install vulkan-sdk
call refreshenv
echo %PATH% >> %GITHUB_PATH%
- name: Merge PR
uses: actions/github-script@v6
with:
script: |
const myExec = async (command) => await exec.getExecOutput('"C:\\Program Files\\Git\\bin\\bash.exe"',["-c",command],{silent: true}).then(result => result.stdout.trim()).catch(err => {console.log(err) ; return false })
const prs = await github.rest.search.issuesAndPullRequests({
q: "type:pr+is:open+repo:yuzu-emu/yuzu+label:early-access-merge,mainline-merge+-label:android,android-merge",
sort: "updated",
order: "asc",
per_page: 100
}).then(res => res.data.items);
for (const pr of prs) {
console.log(`Merge "${pr.title}" ${pr.pull_request.html_url}`);
let pn = pr.number;
await myExec(`git fetch "https://github.com/yuzu-emu/yuzu.git" "pull/${pn}/head:pr-${pn}" -f --no-recurse-submodules`);
await myExec(`git merge --squash "pr-${pn}"`)
await myExec(`git commit -m "${pr.title}" `)
};
let body = await myExec(`GIT_BRANCH=$(git name-rev --name-only HEAD) && git log origin/$GIT_BRANCH..$GIT_BRANCH --pretty=format:"%s"`)
core.exportVariable("body",body);
core.exportVariable("time",new Date().toISOString().slice(0,16))
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
env:
CC: cl.exe
CXX: cl.exe
CXXFLAGS: "/Gw /GA /Gr /Ob2"
run: |
glslangValidator --version
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DYUZU_ENABLE_LTO=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=OFF -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION="early-access" -DCMAKE_BUILD_TYPE=Release -DYUZU_CRASH_DUMPS=ON ..
- name: Build
run: msbuild "build/yuzu.sln" /m /p:Configuration=Release
- name: Pack
shell: pwsh
run: .\.ci\scripts\windows\upload.ps1
- name: Upload
uses: actions/upload-artifact@v3
with:
name: windows
path: artifacts/
- name: Upload EXE
uses: actions/upload-artifact@v3
with:
name: windows(only exe)
path: artifacts/yuzu.exe
- name: Pack 7z
shell: cmd
run:
7z a -m0=lzma2 -mx=9 -ms=on yuzu-windows.7z artifacts/*
- name: Create run_number
uses: ncipollo/release-action@v1
with:
artifacts: "yuzu-windows.7z,artifacts/yuzu.exe"
name: "${{ env.time }}"
body: "${{ env.body }}"
tag: "${{ github.run_number }}"
allowUpdates: true
artifactErrorsFailBuild: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "yuzu-windows.7z,artifacts/yuzu.exe"
name: "${{ env.time }}"
body: "${{ env.body }}"
tag: "release"
allowUpdates: true
artifactErrorsFailBuild: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}