-
Notifications
You must be signed in to change notification settings - Fork 163
61 lines (58 loc) · 2.08 KB
/
test-EMULATOR.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
name: Build OSW Emulator (Ubuntu)
on:
push:
paths-ignore: ["**/*.md", "**/scripts/screen_capture/**"]
pull_request:
branches: [master, develop]
jobs:
check_skip:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: "true" # in a PR with two runs (push+merge), the latter will cancel the first and run instead
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
build-EMULATOR:
runs-on: ubuntu-22.04
needs: check_skip
if: ${{ needs.check_skip.outputs.should_skip != 'true' }}
strategy:
matrix:
build-configuration: [Debug, Release]
steps:
# the following is incompatible with git lfs cache bandwidth calculations (https://github.com/actions/checkout/issues/165)
# -> we removed the following and replaced it with a cache-aware checkout
# - name: Checkout repository and submodules
# uses: actions/checkout@v3
# with:
# submodules: recursive
# lfs: 'true'
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Update packages
run: sudo apt-get update
- name: Install packages
run: sudo apt-get -y install gcc g++ cmake libsdl2-dev libsdl2-image-dev python3 python3-pip
- name: Install python packages
run: pip3 install --user -r scripts/requirements.txt
- name: Create build directory
run: mkdir build
- name: CMake ${{ matrix.build-configuration }}
run: cd build && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-configuration }} ..
- name: Make
run: cd build && make -j $(nproc)
- name: Test
run: cd build && make test
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
build/Testing