Skip to content

Commit

Permalink
check actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaddyWesker committed Mar 3, 2025
1 parent 3563575 commit 66d2cd9
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 126 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
python-version: "3.7"
os: "windows-latest"
cmake-version: "3.24.x"

ci-auto-unix:
uses: './.github/workflows/common.yml'
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
79 changes: 0 additions & 79 deletions .github/workflows/common-windows.yml

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/common-windows/action.yml
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
36 changes: 14 additions & 22 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"

0 comments on commit 66d2cd9

Please sign in to comment.