-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #524 from vsbogd/add-minimal-ci
Add minimal CI workflow
- Loading branch information
Showing
3 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# 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: | ||
run: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
|
||
- 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@v4 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install CMake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: 3.16.x | ||
|
||
- name: Install Conan | ||
uses: turtlebrowser/[email protected] | ||
with: | ||
version: 1.60.2 | ||
|
||
- name: Setup Conan profile | ||
run: | | ||
conan profile new --detect default | ||
- name: Print environment | ||
run: | | ||
echo "rustc --version" | ||
rustc --version | ||
echo "cbindgen --version" | ||
cbindgen --version | ||
echo "python --version" | ||
python --version | ||
echo "conan --version" | ||
conan --version | ||
echo "conan profile show default" | ||
conan profile show default | ||
echo "gcc --version" | ||
gcc --version | ||
echo "cmake --version" | ||
cmake --version | ||
echo "make --version" | ||
make --version | ||
- 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 |
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 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