-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.76 KB
/
Copy pathtests.yml
File metadata and controls
52 lines (47 loc) · 1.76 KB
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
name: Tests
on:
push:
branches: [main]
workflow_dispatch: {}
permissions:
contents: write
jobs:
build-and-deploy:
# concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
container:
image: emscripten/emsdk:3.1.42
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
# Build your program with the given configuration
run: cmake --preset emscripten && cmake --build out/build/emscripten --target sdl_pixel_graphics
- name: Move Files
# Todo - fix this up
run: mkdir output && mv out/build/emscripten/src/sdl_pixel_graphics/sdl_pixel_graphics.* output/ && mv output/sdl_pixel_graphics.html output/index.html
- name: Install rsync 📚
# needed for deploy action
run: apt-get update && apt-get install -y rsync
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: output # The folder the action should deploy.
run-tests:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
container:
image: emscripten/emsdk:3.1.42
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build ⚙️
# Build your program with the given configuration
run: cmake --preset builtin-gcc && cd out/build/builtin-gcc/ && make
- name: Run Tests 🧪
run: cd out/build/builtin-gcc/ && ctest -T test -R test --output-on-failure