Skip to content

MacOS Build and Test #74

MacOS Build and Test

MacOS Build and Test #74

Workflow file for this run

name: MacOS Build and Test
on:
workflow_dispatch:
jobs:
build-and-test:
runs-on: macos-latest
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Building with Python script
run: python build.py
- name: Check 'SpaceEngine' library build success
run: |
if [ -e build/core/libSpaceEngine.a ]; then
echo "SpaceEngine library exists."
else
echo "SpaceEngine library not found. Failing the CI test."
exit 1
fi
- name: Check 'SpaceEditor' executable build success
run: |
if [ -e build/editor/SpaceEditor ]; then
echo "SpaceEditor executable exists."
else
echo "SpaceEditor executable not found. Failing the CI test."
exit 1
fi
- name: Check 'SpaceTests' executable build success
run: |
if [ -e build/tests/SpaceTests ]; then
echo "SpaceTests executable exists."
else
echo "SpaceTests executable not found. Failing the CI test."
exit 1
fi
- name: Run tests
run: |
cd build/tests
./SpaceTests > test_output.txt 2>&1
- name: Check test results
run: |
if grep -q "failed" build/tests/test_output.txt; then
echo "Tests failed."
exit 1
else
echo "Tests passed."
fi