-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (89 loc) · 3.37 KB
/
Copy pathtest.yml
File metadata and controls
105 lines (89 loc) · 3.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
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
name: Generato Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set GENERATO environment variable
run: echo "GENERATO=${{ github.workspace }}" >> $GITHUB_ENV
# Note: Wolfram Engine requires a license. For CI, you would need to:
# 1. Install Wolfram Engine from https://www.wolfram.com/engine/
# 2. Configure a Wolfram Cloud account with a free license
# 3. Set up credentials as GitHub secrets
#
# The following steps assume Wolfram Engine is available.
# Uncomment and configure as needed for your setup.
# - name: Install Wolfram Engine
# run: |
# wget -q https://account.wolfram.com/download/public/wolfram-engine/...
# sudo bash WolframEngine_*.sh -- -auto
#
# - name: Activate Wolfram Engine
# env:
# WOLFRAM_ID: ${{ secrets.WOLFRAM_ID }}
# WOLFRAM_PASSWORD: ${{ secrets.WOLFRAM_PASSWORD }}
# run: |
# wolframscript -activate
# Integration Tests: Generate code for each backend
- name: Run Integration Tests (CarpetX)
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
cd test/CarpetX
$GENERATO/Generato test.wl
- name: Run Integration Tests (CarpetXPointDesc)
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
cd test/CarpetXPointDesc
$GENERATO/Generato test.wl
- name: Run Integration Tests (Carpet)
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
cd test/Carpet
$GENERATO/Generato test.wl
- name: Run Integration Tests (AMReX)
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
cd test/AMReX
$GENERATO/Generato test.wl
- name: Run Integration Tests (Nmesh)
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
cd test/Nmesh
$GENERATO/Generato test.wl
$GENERATO/Generato GHG_rhs.wl
# Golden File Comparison
- name: Run Golden File Regression Tests
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
wolframscript -f test/regression/compare_golden.wl
# Syntax Check: Verify generated C/C++ code compiles
- name: Check CarpetX output syntax
run: |
if [ -f test/CarpetX/test.hxx ]; then
g++ -fsyntax-only -x c++ test/CarpetX/test.hxx 2>/dev/null || echo "Note: CarpetX test.hxx may require framework headers"
fi
- name: Check Nmesh output syntax
run: |
if [ -f test/Nmesh/test.c ]; then
gcc -fsyntax-only test/Nmesh/test.c 2>/dev/null || echo "Note: Nmesh test.c may require framework headers"
fi
# Unit Tests
- name: Run Unit Tests
if: ${{ false }} # Disabled until Wolfram Engine is configured
run: |
wolframscript -f test/AllTests.wl
# Optional: Matrix test across multiple platforms
# test-matrix:
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# # ... additional steps