-
Notifications
You must be signed in to change notification settings - Fork 431
130 lines (118 loc) · 3.77 KB
/
ci.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
126
127
128
129
130
name: CI
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
push:
tags-ignore:
- "*.*"
paths-ignore:
- "docs/**"
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
tests:
name: ${{ matrix.runs-on }} • py${{ matrix.python }}
needs: pre-commit
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
python: '3.8'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.9'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.10'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.11'
triplet: x64-linux-mixed
- runs-on: ubuntu-latest
python: '3.12'
triplet: x64-linux-mixed
- runs-on: macos-latest
python: '3.8'
triplet: x64-osx-mixed
- runs-on: macos-latest
python: '3.9'
triplet: x64-osx-mixed
- runs-on: macos-latest
python: '3.10'
triplet: x64-osx-mixed
- runs-on: macos-latest
python: '3.11'
triplet: x64-osx-mixed
- runs-on: macos-latest
python: '3.12'
triplet: x64-osx-mixed
# - runs-on: windows-latest
# python: '3.8'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.9'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.10'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.11'
# triplet: x64-windows
# - runs-on: windows-latest
# python: '3.12'
# triplet: x64-windows
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install test dependencies
# TODO(jfarebro): There's a bug with Windows cmake and PEP517 builds via pip install.
# As a temporary workaround installing cmake outside of the isolated env seems to work.
run: python -m pip install --user cmake
- uses: microsoft/[email protected]
if: runner.os == 'Windows'
# TODO(jfarebro): 02/16/2023 - There's a bug where pkg-config isn't installed on the macOS
# runner. See: https://github.com/actions/runner-images/pull/7125
- name: Install pkg-config on macOS
if: runner.os == 'macOS'
run: brew install pkg-config
- uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: "9aa0d66373ce3a6868d12353d0d4960db0d4bd18"
# There's a permissions issue with the cache
# https://github.com/microsoft/vcpkg/issues/20121
doNotCache: true
- name: Download and unpack ROMs
run: ./scripts/download_unpack_roms.sh
- name: Build
run: python -m pip install --verbose .[test]
- name: Test
run: python -m pytest
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup SSH debug session on failure
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() }}
with:
limit-access-to-actor: true