Skip to content

build cleanup

build cleanup #256

Workflow file for this run

name: Core Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch: # manual trigger
jobs:
setup:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches all history for all branches and tags
- name: Determine Version and Build Number
id: set_version
run: |
# Fetch all tags
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# Get the latest tag that matches the branch suffix
LATEST_TAG=$(git tag --list | grep -E "^[[:digit:]]+\.[[:digit:]]+\$" | sort -V | tail -n1)
if [ -z "$LATEST_TAG" ]; then
echo "No matching tags found. Setting default version."
VERSION_NUMBER="0.1"
BUILD_NUMBER="0"
else
echo "Found latest tag: $LATEST_TAG"
VERSION_NUMBER=$LATEST_TAG
BUILD_NUMBER=$(git rev-list --count $LATEST_TAG..HEAD)
fi
FULL_VERSION="$VERSION_NUMBER.$BUILD_NUMBER"
echo "version=$FULL_VERSION" >> $GITHUB_OUTPUT
echo "Version Number: $FULL_VERSION"
test:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v3
- name: Update Package Lists
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install valgrind g++ make --fix-missing
- name: Build
run: |
VORTEX_BUILD_NUMBER=${{ needs.setup.outputs.version }}
make -j
working-directory: VortexEngine
- name: Set execute permissions for test script
run: chmod +x ./runtests.sh
working-directory: VortexEngine/tests
- name: Run general tests
run: ./runtests.sh --general
working-directory: VortexEngine/tests
wasm:
needs: [setup, test]
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v3
- name: Update Package Lists
run: sudo apt-get update
- name: Install Emscripten
run: |
sudo apt install -y cmake python3
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
working-directory: VortexEngine/VortexLib
- name: Build Webassembly
run: |
source ./emsdk/emsdk_env.sh
VORTEX_BUILD_NUMBER=${{ needs.setup.outputs.version }}
make -j wasm
working-directory: VortexEngine/VortexLib
docs:
needs: [setup, test, wasm]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout current repository
uses: actions/checkout@v3
- name: Update Package Lists
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install doxygen graphviz texlive --fix-missing
- name: Checkout doxygen-awesome
run: git clone https://github.com/jothepro/doxygen-awesome-css.git doxygen-awesome-css
- name: Generate Documentation
run: doxygen Doxyfile
- name: Commit and Push Documentation
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add docs
git commit -m "Update Doxygen documentation"
git push -f origin HEAD:core-docs