forked from trueagi-io/hyperon-experimental
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3563575
commit 66d2cd9
Showing
5 changed files
with
116 additions
and
126 deletions.
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
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 |
---|---|---|
|
@@ -6,36 +6,29 @@ | |
|
||
name: common-unix | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
python-version: | ||
description: "A version of a python interpreter to use" | ||
default: "3.7" | ||
required: false | ||
type: string | ||
os: | ||
description: "A container which is used to make a build" | ||
default: "ubuntu-22.04" | ||
required: false | ||
type: string | ||
cmake-version: | ||
description: "CMake version to use" | ||
default: "3.24.x" | ||
required: false | ||
type: string | ||
|
||
inputs: | ||
python-version: | ||
description: "A version of a python interpreter to use" | ||
default: "3.7" | ||
required: false | ||
type: string | ||
os: | ||
description: "A container which is used to make a build" | ||
default: "ubuntu-22.04" | ||
required: false | ||
type: string | ||
cmake-version: | ||
description: "CMake version to use" | ||
default: "3.24.x" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build-all: | ||
runs-on: ${{ inputs.os }} | ||
runs-on: "ubuntu-22.04" | ||
|
||
steps: | ||
- name: Print folder tree | ||
uses: jaywcjlove/[email protected] | ||
with: | ||
path: ./hyperon-experimental | ||
depth: 5 | ||
|
||
- name: Test Rust library | ||
working-directory: ./lib | ||
run: | | ||
|
This file was deleted.
Oops, something went wrong.
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,83 @@ | ||
# This reusable workflow builds the project and tests it. | ||
|
||
# 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: common-windows | ||
|
||
inputs: | ||
python-version: | ||
description: "A version of a python interpreter to use" | ||
default: "3.7" | ||
required: false | ||
type: string | ||
os: | ||
description: "A container which is used to make a build" | ||
default: "windows-latest" | ||
required: false | ||
type: string | ||
cmake-version: | ||
description: "CMake version to use" | ||
default: "3.24.x" | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build-all: | ||
runs-on: "windows-latest" | ||
|
||
steps: | ||
- name: Test Rust library | ||
working-directory: ./lib | ||
run: | | ||
chcp 65001 #set code page to utf-8 | ||
echo ("RUST_LOG=hyperon=debug" >> $env:GITHUB_ENV) | ||
cargo test | ||
- name: Print environment | ||
run: | | ||
echo "ver" | ||
ver | ||
echo "rustc --version" | ||
rustc --version | ||
echo "cbindgen --version" | ||
cbindgen --version | ||
echo "python --version" | ||
where python | ||
python --version | ||
python -c "import platform; print(platform.platform())" | ||
echo "conan --version" | ||
conan --version | ||
# conan_python=$( head -1 $(where 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 -DPython3_EXECUTABLE=`which python` -DCMAKE_C_COMPILER=gcc -DGIT=OFF .. | ||
- name: Build C Api | ||
working-directory: ./build | ||
run: cmake --build . --config Release | ||
|
||
- name: Test C API | ||
working-directory: ./build | ||
run: cmake --build . --target check --config Release |
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ on: | |
type: string | ||
os: | ||
description: "A container which is used to make a build" | ||
default: "windows-latest" | ||
default: "ubuntu-22.04" | ||
required: false | ||
type: string | ||
cmake-version: | ||
|
@@ -70,26 +70,18 @@ jobs: | |
run: | | ||
conan profile detect --force | ||
- name: Print folder tree | ||
uses: jaywcjlove/[email protected] | ||
- name: Choose OS | ||
if: ${{ startsWith(inputs.os, 'windows') }} | ||
uses: './.github/workflows/common-windows' | ||
with: | ||
path: ./ | ||
depth: 5 | ||
python-version: "3.7" | ||
os: "windows-latest" | ||
cmake-version: "3.24.x" | ||
|
||
run-windows: | ||
needs: build-all | ||
if: ${{ startsWith(inputs.os, 'windows') }} | ||
uses: './.github/workflows/common-windows.yml' | ||
with: | ||
python-version: "3.7" | ||
os: "windows-latest" | ||
cmake-version: "3.24.x" | ||
|
||
run-ubuntu: | ||
needs: build-all | ||
if: ${{ !startsWith(inputs.os, 'windows') }} | ||
uses: './.github/workflows/common-unix.yml' | ||
with: | ||
python-version: "3.7" | ||
os: "ubuntu-22.04" | ||
cmake-version: "3.24.x" | ||
- name: Choose OS | ||
if: ${{ !startsWith(inputs.os, 'windows') }} | ||
uses: './.github/workflows/common-unix' | ||
with: | ||
python-version: "3.7" | ||
os: "ubuntu-22.04" | ||
cmake-version: "3.24.x" |