-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (93 loc) · 2.79 KB
/
sirc-tiledit.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
name: SIRC Tiledit
# TODO: Only run when sirc-tiledit directory has changes
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
defaults:
run:
working-directory: ./sirc-tiledit
jobs:
build:
name: Build and Test on ${{ matrix.os }} with Meson v${{ matrix.meson_version }}
runs-on: ${{ matrix.os }}
container:
# TODO: Change this to 'main' after merge
image: ghcr.io/noxharmonium/sirc-tiledit-build:pr-274
options: --user root
strategy:
matrix:
os: [ubuntu-24.04]
# TODO: Get version from .tool-versions?
meson_version: ["1.4.1"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set ownership
run: |
# Workaround for https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Configure Project
run: |
meson --version
meson setup -Db_coverage=true --buildtype debug build-debug/
meson setup --buildtype release build-release/
- name: Compile Project (Debug)
run: |
cd build-debug
meson compile -v
- name: Test Project
run: |
cd build-debug
meson test --print-errorlogs
ninja coverage-xml
- name: Archive test coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: codecov-tiledit
path: |
./sirc-tiledit/build-debug/meson-logs/coverage.xml
./sirc-tiledit/libs/shared/tests/resources/*actual*.png
if-no-files-found: error
- name: Lint Project
run: |
cd build-debug
git ls-files /__w/sirc/sirc/sirc-tiledit
clang-tidy --version
ninja clang-tidy
clang-format --version
ninja clang-format-check
- name: Compile Project (Release)
run: |
cd build-release
meson compile -v
- name: Create release
run: |
cd build-release
meson dist
- name: Archive release
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: build artifacts
path: ./sirc-tiledit/build-release/meson-dist/*
if-no-files-found: error
upload-to-codecov:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: codecov-tiledit
- name: List artifacts
run: ls -la
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: coverage.xml
fail_ci_if_error: true