summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorGravatar Morph2022-07-05 20:30:38 -0400
committerGravatar GitHub2022-07-05 20:30:38 -0400
commit770611fdf39f274ee9ccde9875e86cfeb79a3f6f (patch)
treea580077f3b8f5ebbba6ee58ba594192f68ebdeea /.github/workflows
parentMerge pull request #8532 from liamwhite/fiber-supplements (diff)
parentCI: unbreak ADO after GHA changes (diff)
downloadyuzu-770611fdf39f274ee9ccde9875e86cfeb79a3f6f.tar.gz
yuzu-770611fdf39f274ee9ccde9875e86cfeb79a3f6f.tar.xz
yuzu-770611fdf39f274ee9ccde9875e86cfeb79a3f6f.zip
Merge pull request #8486 from liushuyu/github-actions-verify
CI: Use GitHub Actions to validate pull requests
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/verify.yml115
1 files changed, 115 insertions, 0 deletions
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
new file mode 100644
index 000000000..7e39ef847
--- /dev/null
+++ b/.github/workflows/verify.yml
@@ -0,0 +1,115 @@
1name: 'yuzu verify'
2
3on:
4 pull_request:
5 branches: [ master ]
6
7jobs:
8 format:
9 name: 'verify format'
10 runs-on: ubuntu-latest
11 container:
12 image: yuzuemu/build-environments:linux-clang-format
13 options: -u 1001
14 steps:
15 - uses: actions/checkout@v2
16 with:
17 submodules: false
18 - name: 'Verify Formatting'
19 run: bash -ex ./.ci/scripts/format/script.sh
20 build:
21 name: 'test build'
22 needs: format
23 runs-on: ubuntu-latest
24 strategy:
25 fail-fast: false
26 matrix:
27 include:
28 - type: clang
29 image: linux-fresh
30 - type: linux
31 image: linux-fresh
32 - type: windows
33 image: linux-mingw
34 container:
35 image: yuzuemu/build-environments:${{ matrix.image }}
36 options: -u 1001
37 steps:
38 - uses: actions/checkout@v2
39 with:
40 submodules: recursive
41 fetch-depth: 0
42 - name: Set up cache
43 uses: actions/cache@v2
44 id: ccache-restore
45 with:
46 path: ~/.ccache
47 key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
48 restore-keys: |
49 ${{ runner.os }}-${{ matrix.type }}-
50 - name: Create ccache directory
51 if: steps.ccache-restore.outputs.cache-hit != 'true'
52 run: mkdir -p ~/.ccache
53 - name: Build
54 run: ./.ci/scripts/${{ matrix.type }}/docker.sh
55 env:
56 ENABLE_COMPATIBILITY_REPORTING: "ON"
57 - name: Pack
58 run: ./.ci/scripts/${{ matrix.type }}/upload.sh
59 env:
60 NO_SOURCE_PACK: "YES"
61 - name: Upload
62 uses: actions/upload-artifact@v3
63 with:
64 name: ${{ matrix.type }}
65 path: artifacts/
66 build-msvc:
67 name: 'test build (windows, msvc)'
68 needs: format
69 runs-on: windows-2019
70 steps:
71 - name: Set up cache
72 uses: actions/cache@v2
73 with:
74 path: ~/.buildcache
75 key: ${{ runner.os }}-msvc-${{ github.sha }}
76 restore-keys: |
77 ${{ runner.os }}-msvc-
78 - name: Install dependencies
79 # due to how chocolatey works, only cmd.exe is supported here
80 shell: cmd
81 run: |
82 choco install vulkan-sdk wget
83 python -m pip install --upgrade pip conan
84 call refreshenv
85 wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
86 7z x buildcache-windows.zip
87 copy buildcache\bin\buildcache.exe C:\ProgramData\chocolatey\bin
88 rmdir buildcache
89 echo %PATH% >> %GITHUB_PATH%
90 - name: Set up MSVC
91 uses: ilammy/msvc-dev-cmd@v1
92 - uses: actions/checkout@v2
93 with:
94 submodules: recursive
95 fetch-depth: 0
96 - name: Configure
97 env:
98 CC: cl.exe
99 CXX: cl.exe
100 run: |
101 glslangValidator --version
102 mkdir build
103 cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=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=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release
104 - name: Build
105 run: cmake --build build
106 - name: Cache Summary
107 run: buildcache -s
108 - name: Pack
109 shell: pwsh
110 run: .\.ci\scripts\windows\upload.ps1
111 - name: Upload
112 uses: actions/upload-artifact@v3
113 with:
114 name: msvc
115 path: artifacts/