Merge pull request #720 from CICS-Oleg/main #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow is intended to run tests on minimal 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: minimal | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
minimal: | |
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 minimal | |
cargo build --features minimal | |
- name: Test Rust library | |
working-directory: ./lib | |
run: | | |
RUST_LOG=hyperon=debug cargo test --features minimal | |
- 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.19.x" | |
- name: Install Conan | |
uses: turtlebrowser/[email protected] | |
with: | |
version: "1.64" | |
- name: Setup Conan profile | |
run: | | |
conan profile new --detect default | |
- 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 default" | |
conan profile show default | |
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/minimal" -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 |