-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (126 loc) · 5.51 KB
/
rtype.yaml
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
# This is a workflow meant for epitech students
name: CI Epitech Project
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggers the worlfow every day at 23h42
# schedule:
# - cron: "42 23 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build_ubuntu"
build_ubuntu:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Update repository with vcpkg submodule
- name: Pull & update submodules recursively
run: |
git submodule update --init vcpkg
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
working-directory: ${{github.workspace}}/vcpkg
run: |
./vcpkg
# Integrate and install vcpkg dependencies
- uses: actions/checkout@v3
working-directory: ${{github.workspace}}/vcpkg
run: |
./vcpkg integrate install
./vcpkg install
# Create a folder for builds and executables
- name: Create `Builds` folder
run: mkdir -p Builds
# Configure CMake in the previously created 'Builds' subdirectory.
- name: Configure CMake
run: cmake -B ${{github.workspace}}/Builds -DCMAKE_BUILD_TYPE=Release
# Build R-Type projet :frog:
- name: Build
run: cmake --build ${{github.workspace}}/Builds --config Release
# A workflow run is made up of one or more jobs that can run sequentially or in parallel, tailor made for MSVC
build_windows:
# The type of runner that the job will run on
runs-on: windows-latest
container:
image: buildtools2022:latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Update repository with vcpkg submodule
- name: Pull & update submodules recursively
run: |
git submodule update --init vcpkg
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
working-directory: ${{github.workspace}}/vcpkg
run: |
./vcpkg
# Integrate and install vcpkg dependencies
- uses: actions/checkout@v3
working-directory: ${{github.workspace}}/vcpkg
run: |
./vcpkg integrate install
./vcpkg install
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: New-Item ${{github.workspace}}/Builds -itemType Directory
# Configure CMake in the previously created 'Builds' subdirectory.
- name: Compile CMake
shell: powershell
working-directory: ${{github.workspace}}/Builds
run: cmake $env:GITHUB_WORKSPACE -G "Visual Studio 17 2022"
# Build R-Type projet :frog:
- name: Build
shell: powershell
working-directory: ${{github.workspace}}/Builds
run: cmake --build . -G "Visual Studio 17 2022"
# This workflow contains a single job called "build_test"
build_test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service.
- uses: lukka/get-cmake@latest
# Runs a bash file that executes unit tests (with criterion)
- name: Configure building environment
shell: bash
working-directory: ${{github.workspace}}
run: |
sudo apt-get update -qq
sudo apt-get install -y gcc-multilib
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
# Runs a bash file that executes unit tests (with criterion)
- name: Build testing environment
shell: bash
working-directory: ${{github.workspace}}
run: mkdir -p Builds
# Runs a bash file that executes unit tests (with criterion)
- name: Build R-Type-Test project
shell: bash
working-directory: ${{github.workspace}}
run: cmake -B Builds -DUNIT_TESTS=ON
# Runs a bash file that executes unit tests (with criterion)
- name: Compile r-type_test binary
shell: bash
working-directory: ${{github.workspace}}
run: cmake --build Builds
# Runs a bash file that executes unit tests (with criterion)
- name: Execute Criterion testing sequences
shell: bash
working-directory: ${{github.workspace}}
run: ./Builds/Tests/r-type_test