-
Notifications
You must be signed in to change notification settings - Fork 54
117 lines (100 loc) · 3.27 KB
/
old_interpreter.yml
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
106
107
108
109
110
111
112
113
114
115
116
117
# This workflow is intended to run tests on old Rust MeTTa interpreter.
# It is indicative and temporary, it doesn't prevent any changes from merging.
# This workflow uses actions that are not certified by GitHub. They are
# provided by a third-party and are governed by separate terms of service,
# privacy policy, and support documentation.
name: old_interpreter
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
old_interpreter:
runs-on: "ubuntu-20.04"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Rust stable
uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
- name: Build Rust library
working-directory: ./lib
run: |
cargo check --features old_interpreter
cargo build --features old_interpreter
- name: Test Rust library
working-directory: ./lib
run: |
RUST_LOG=hyperon=debug cargo test --features old_interpreter
- name: Install cbindgen
uses: actions-rs/[email protected]
with:
command: install
args: cbindgen
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: "3.24.x"
- name: Install Conan
uses: turtlebrowser/[email protected]
with:
version: "2.5.0"
- name: Setup Conan profile
run: |
conan profile detect --force
- name: Print environment
run: |
echo "uname -a"
uname -a
echo "rustc --version"
rustc --version
echo "cbindgen --version"
cbindgen --version
echo "python --version"
which python
python --version
python -c "import platform; print(platform.platform())"
echo "python3 --version"
which python3
python3 --version
python3 -c "import platform; print(platform.platform())"
echo "conan --version"
conan --version
conan_python=$( head -1 $(which conan) | cut -c 3- )
echo "conan Python: $conan_python"
echo -n "conan Python platform: "
$conan_python -c "import platform; print(platform.platform())"
echo "conan profile show"
conan profile show
echo "gcc --version"
gcc --version
echo "g++ --version"
g++ --version
echo "cmake --version"
cmake --version
file $(which cmake)
echo "make --version"
make --version
file $(which make)
- name: Setup C API build
run: |
mkdir -p build
cd build
# specify C compiler as conan could not find it automatically
# see https://github.com/conan-io/conan/issues/4322
cmake -DCARGO_ARGS="--features hyperon/old_interpreter" -DCMAKE_BUILD_TYPE=Release -DPython3_EXECUTABLE=`which python` -DCMAKE_C_COMPILER=gcc ..
- name: Build C API
working-directory: ./build
run: make
- name: Test C API
working-directory: ./build
run: make check