Skip to content

Add unit system into dev branch #37

Add unit system into dev branch

Add unit system into dev branch #37

name: gkit-linux-build-test
on:
push:
branches-ignore: [ "main" ]
pull_request:
branches-ignore: [ "main" ]
jobs:
build-and-test:
name: Build and Test on Ubuntu-latest
runs-on: ubuntu-latest
strategy:
matrix:
preset: [ "linux-x86_64-gcc-debug", "linux-x86_64-gcc-noabi-debug",
"linux-x86_64-llvm-debug", "linux-x86_64-llvm-noabi-debug" ]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Show build information
run: |
echo "πŸš€ Starting build for gkit project"
echo "Platform: ${{ runner.os }}"
echo "Workflow: ${{ github.workflow }}"
echo "Repository: ${{ github.repository }}"
echo "Commit SHA: ${{ github.sha }}"
- name: Install dependencies
run: |
echo "πŸ“¦ Installing Ubuntu dependencies..."
sudo apt-get update
sudo apt-get install -y \
build-essential clang cmake ninja-build \
libasound2-dev libpulse-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
libxss-dev libxtst-dev libxkbcommon-dev libdrm-dev \
libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev \
libdbus-1-dev libibus-1.0-dev libudev-dev
echo "βœ… Ubuntu dependencies installed successfully"
- name: Configure CMake
run: |
echo "βš™οΈ Configuring CMake for Linux..."
echo "Using preset: ${{matrix.preset}}"
cmake --preset ${{matrix.preset}}
echo "βœ… CMake configuration completed"
- name: Configure and build project
run: |
echo "πŸ”¨ Building project on Linux..."
BUILD_DIR="${{ github.workspace }}/build/${{matrix.preset}}"
echo "Build directory: $BUILD_DIR"
cmake --build $BUILD_DIR
echo "βœ… Linux build completed successfully"
- name: Show build results
run: |
echo "πŸŽ‰ Build process completed!"
echo "Platform: Linux(Ubuntu-latest)"
echo "Job status: ${{ job.status }}"
# List built files
echo "πŸ“ Built files:"
find ${{ github.workspace }}/build -name "*.so" -o -name "*.dll" -o -name "*.a" -o -name "*.lib" 2>/dev/null || echo "No library files found"
# Show disk usage
echo "πŸ’Ύ Disk usage:"
du -sh ${{ github.workspace }}/build 2>/dev/null || echo "Build directory size info not available"