Skip to content

remove actions

remove actions #4

Workflow file for this run

# 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
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
env:
CMAKE_MULTIBUILD_CONFIG: "${{ startsWith(inputs.os, 'windows') && '--config Debug' || '' }}"
CMAKE_GIT_EXCLUDE: "${{ startsWith(inputs.os, 'windows') && '-DGIT=OFF' || '' }}"
jobs:
build-all:
runs-on: ${{ inputs.os }}
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
cargo build
- 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: ${{ inputs.python-version }}
- name: Install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ inputs.cmake-version }}
- name: Install Conan
uses: turtlebrowser/[email protected]
with:
version: "2.5.0"
- name: Setup Conan profile
run: |
conan profile detect --force
shell: bash
- name: Test Rust library
run: RUST_LOG=hyperon=debug cargo test
shell: bash

Check failure on line 81 in .github/workflows/common.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/common.yml

Invalid workflow file

You have an error in your yaml syntax on line 81
- name: Print environment
if: ${{ startsWith(inputs.os, 'windows') }}
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)
shell: bash
- name: Print environment
if: ${{ !startsWith(inputs.os, 'windows') }}
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)
shell: bash
- 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 ${{ env.CMAKE_GIT_EXCLUDE }} ..
shell: bash
- name: Build C API
working-directory: ./build
run: cmake --build . ${{ env.CMAKE_MULTIBUILD_CONFIG }}
shell: bash
- name: Test C API
working-directory: ./build
run: cmake --build . --target check ${{ env.CMAKE_MULTIBUILD_CONFIG }}
shell: bash