-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (49 loc) · 1.37 KB
/
cpp_smart_array_ci.yaml
File metadata and controls
58 lines (49 loc) · 1.37 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
name: C++ Smart Array CI
on:
push:
paths:
- 'cpp/smart_array/**'
defaults:
run:
shell: bash
working-directory: ./cpp/smart_array
permissions:
contents: read
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build C++ solution
uses: threeal/cmake-action@v2
with:
source-dir: cpp/smart_array
build-dir: ci-build
- name: Run C++ tests
working-directory: ci-build/
run: |
ctest --output-on-failure
points-system:
name: Award Points
runs-on: ubuntu-latest
needs: test
defaults:
run:
shell: bash
working-directory: .
steps:
- name: Check secrets and increment points
shell: bash
run: |
if [[ -n "${{ secrets.GKSS_LEADERBOARD_API_URL }}" && -n "${{ secrets.GKSS_LEADERBOARD_API_KEY }}" ]]; then
echo "Incrementing points..."
curl -X POST ${{ secrets.GKSS_LEADERBOARD_API_URL }} \
-H "x-gkssunisa-api-key: ${{ secrets.GKSS_LEADERBOARD_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"message": "i did it! ${{ github.actor }}"}'
else
echo "Skipping points increment - required secrets not found"
exit 1
fi