Skip to content

Commit b8a85f3

Browse files
committed
ci - run test workflow (wip)
1 parent 903bad9 commit b8a85f3

File tree

3 files changed

+67
-4
lines changed

3 files changed

+67
-4
lines changed

.github/workflows/run_tests.yaml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
env:
11+
CACHE_PATHS: |
12+
~/Library/Caches/pip
13+
~/.cargo
14+
~/.ccache
15+
~/.hunter
16+
~/.rustup
17+
~/.cache/pip
18+
~/.cache/vcpkg
19+
20+
jobs:
21+
build-linux:
22+
runs-on: ubuntu-24.04
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Cache folders
28+
uses: actions/cache@v4
29+
with:
30+
31+
test:
32+
runs-on: ubuntu-24.04
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Cache folders
38+
uses: actions/cache@v4
39+
with:
40+
path: |
41+
build
42+
build-debug
43+
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt') }}
44+
restore-keys: |
45+
${{ runner.os }}-build-
46+
47+
- name: Build test
48+
working-directory: .ci
49+
run: bash build_test.sh
50+
51+
- name: Check generated files
52+
working-directory: .ci
53+
run: python3 check_files.py
54+
55+
- name: Run cargo tests
56+
working-directory: .ci
57+
run: bash cargo_tests.sh
58+
59+
# - name: Run tests
60+
# working-directory: .ci
61+
# run: bash run_all_tests.sh
62+

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@
3838
/.build
3939
/.venv
4040
/.vcpkg
41+
/.build*

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ SHELL := /bin/bash
22
PROJECT := $(shell pwd)
33
CI_DIR := $(PROJECT)/.ci
44

5-
VENV=$(PROJECT)/.venv
6-
BUILD=$(PROJECT)/.build
7-
VCPKG=$(PROJECT)/.vcpkg
8-
PATH=$(VENV)/bin:$(shell echo $$PATH)
5+
VENV ?= $(PROJECT)/.venv
6+
BUILD ?= $(PROJECT)/.build
7+
VCPKG ?= $(PROJECT)/.vcpkg
8+
PATH = $(VENV)/bin:$(shell echo $$PATH)
99

1010
ifneq (,$(wildcard $(CI_DIR)/.env))
1111
include $(CI_DIR)/.env

0 commit comments

Comments
 (0)