-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 2.09 KB
/
ci.yaml
File metadata and controls
62 lines (54 loc) · 2.09 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
53
54
55
56
57
58
59
60
61
62
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
matrix-build:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
compiler:
- { name: clang, cxx: 'clang++', version: latest }
- { name: gcc, cxx: 'g++', version: latest }
build_type: [Debug, Release]
name: Build (${{ matrix.compiler.name }}-${{ matrix.compiler.version }} ${{ matrix.build_type }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}
container:
image: appflow-ci/${{ matrix.compiler.name }}:${{ matrix.compiler.version }}
steps:
- name: Print event name
run: |
echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
echo "🖥️ This job is now running on ${{ runner.os }} (${{ matrix.os }}) with ${{ matrix.compiler.name }}"
echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "$TUMBLEWEED_SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "Host gitea.nameksirius.me" >> ~/.ssh/config
echo " HostName gitea.nameksirius.me" >> ~/.ssh/config
echo " Port 46" >> ~/.ssh/config
echo " User git" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
ssh-keyscan -p 46 gitea.nameksirius.me >> ~/.ssh/known_hosts
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
ssh-key: ${{ secrets.TUMBLEWEED_SSH_PRIVATE_KEY }}
- name: Configure project
run: |
mkdir -p build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER=${{ matrix.compiler.name }} \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \
-S . \
-B build \
-G Ninja
- name: Build project
run: cmake --build build