57 lines
2.3 KiB
YAML

name: Build
runs:
using: "composite"
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
persist-credentials: false
- name: 'Detect architecture'
id: arch
shell: bash
run: echo "value=$(uname -m)" >> "$GITHUB_OUTPUT"
- name: 'Configure'
shell: bash
run: cmake -S ./ -B buildsim
- name: 'Build'
shell: bash
run: cmake --build buildsim --target TactilityKernel lvgl minitar minmea $(cat Buildscripts/release-sdk-modules.txt)
- name: 'Release'
shell: bash
run: python Buildscripts/release-sdk-posix.py release/TactilitySDK
- name: 'Test Integration Prep'
shell: bash
env:
TACTILITY_ARCH: ${{ steps.arch.outputs.value }}
run: |
TACTILITY_PLATFORM_PATH="test_sdk/sdk/$(cat version.txt)/platform-posix-$TACTILITY_ARCH"
mkdir -p $TACTILITY_PLATFORM_PATH
cp -r release/TactilitySDK $TACTILITY_PLATFORM_PATH/TactilitySDK
mkdir -p test_sdk/sdk/$(cat version.txt)/tools
cp Buildscripts/TactilitySDK/Tools/*.py test_sdk/sdk/$(cat version.txt)/tools/
python -c "import sys; sys.path.insert(0, 'Buildscripts/CDN'); from new_project import create_new_project_zip; create_new_project_zip('test_sdk/sdk/$(cat version.txt)')"
- name: 'Test Integration'
shell: bash
env:
TACTILITY_ARCH: ${{ steps.arch.outputs.value }}
run: cd Tests/SdkIntegration && TACTILITY_SDK_PATH=../../test_sdk python ../../tt.py app build -a posix-$TACTILITY_ARCH
- name: 'Test New Project'
shell: bash
env:
TACTILITY_ARCH: ${{ steps.arch.outputs.value }}
run: |
SDK_VERSION=$(cat version.txt)
# The answers are: generate, SDK version, package id, app id, app name and terminal app. An empty line takes the default.
for terminal in "" "y"; do
project_path="$RUNNER_TEMP/new-project-${terminal:-gui}"
mkdir -p "$project_path"
(cd "$project_path" && printf 'y\n%s\n\n\n\n%s\n' "$SDK_VERSION" "$terminal" | TACTILITY_SDK_PATH="$GITHUB_WORKSPACE/test_sdk" python "$GITHUB_WORKSPACE/tt.py" app build -a posix-$TACTILITY_ARCH)
done
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: TactilitySDK-posix-${{ steps.arch.outputs.value }}
path: release/TactilitySDK
retention-days: 30