Repository navigation
CLI Errors #341
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Linux builds (basic) | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cxx: | |
| - g++-12 | |
| - g++-13 | |
| - g++-14 | |
| - clang++-16 | |
| - clang++-17 | |
| - clang++-18 | |
| build_type: [Debug] #, Release] | |
| std: [20] | |
| include: | |
| # cannot be installed on ubuntu-24.04 be default? | |
| - cxx: g++-12 | |
| cc: gcc-12 | |
| other_pkgs: g++-12 | |
| cxxflags: "-O1 -ffunction-sections -fdata-sections -fmax-errors=5 --param ggc-min-expand=0 --param ggc-min-heapsize=8192" | |
| - cxx: g++-13 | |
| cc: gcc-13 | |
| other_pkgs: g++-13 | |
| cxxflags: "-O1 -ffunction-sections -fdata-sections -fmax-errors=5 --param ggc-min-expand=0 --param ggc-min-heapsize=8192" | |
| - cxx: g++-14 | |
| cc: gcc-14 | |
| other_pkgs: g++-14 | |
| cxxflags: "-O1 -ffunction-sections -fdata-sections -fmax-errors=5 --param ggc-min-expand=0 --param ggc-min-heapsize=8192" | |
| - cxx: clang++-16 | |
| cc: clang-16 | |
| other_pkgs: clang-16 | |
| cxxflags: "-O1 -ffunction-sections -fdata-sections -fmax-errors=5" | |
| - cxx: clang++-17 | |
| cc: clang-17 | |
| other_pkgs: clang-17 | |
| cxxflags: "-O1 -ffunction-sections -fdata-sections -fmax-errors=5" | |
| - cxx: clang++-18 | |
| cc: clang-18 | |
| other_pkgs: clang-18 | |
| cxxflags: "-O1 -ffunction-sections -fdata-sections -fmax-errors=5" | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Verify directory structure | |
| run: | | |
| echo "Verifying new directory structure..." | |
| echo "Current working directory: $(pwd)" | |
| echo "Contents of root directory:" | |
| ls -la | |
| echo "" | |
| echo "Checking if we need to cd into viewtouchFork subdirectory..." | |
| if [ -d "viewtouchFork" ]; then | |
| echo "Found viewtouchFork subdirectory, changing into it..." | |
| cd viewtouchFork | |
| echo "Now in: $(pwd)" | |
| echo "Contents after cd:" | |
| ls -la | |
| echo "" | |
| fi | |
| echo "Checking main directories:" | |
| if [ -d "src" ]; then | |
| echo "✓ src/ exists" | |
| ls -la src/ | |
| if [ -d "src/core" ] && [ -d "src/utils" ] && [ -d "src/network" ]; then | |
| echo "✓ src/ subdirectories exist" | |
| else | |
| echo "✗ Missing src/ subdirectories" | |
| exit 1 | |
| fi | |
| else | |
| echo "✗ src/ directory missing" | |
| exit 1 | |
| fi | |
| if [ -d "main" ]; then | |
| echo "✓ main/ exists" | |
| ls -la main/ | |
| if [ -d "main/business" ] && [ -d "main/hardware" ] && [ -d "main/ui" ] && [ -d "main/data" ]; then | |
| echo "✓ main/ subdirectories exist" | |
| else | |
| echo "✗ Missing main/ subdirectories" | |
| exit 1 | |
| fi | |
| else | |
| echo "✗ main/ directory missing" | |
| exit 1 | |
| fi | |
| if [ -d "scripts" ]; then | |
| echo "✓ scripts/ exists" | |
| ls -la scripts/ | |
| if [ -d "scripts/build" ] && [ -d "scripts/install" ] && [ -d "scripts/system" ] && [ -d "scripts/maintenance" ] && [ -d "scripts/tools" ]; then | |
| echo "✓ scripts/ subdirectories exist" | |
| else | |
| echo "✗ Missing scripts/ subdirectories" | |
| exit 1 | |
| fi | |
| else | |
| echo "✗ scripts/ directory missing" | |
| exit 1 | |
| fi | |
| if [ -d "assets" ]; then | |
| echo "✓ assets/ exists" | |
| ls -la assets/ | |
| if [ -d "assets/data" ] && [ -d "assets/images" ]; then | |
| echo "✓ assets/ subdirectories exist" | |
| else | |
| echo "✗ Missing assets/ subdirectories" | |
| exit 1 | |
| fi | |
| else | |
| echo "✗ assets/ directory missing" | |
| exit 1 | |
| fi | |
| echo "Checking other directories:" | |
| [ -d "config" ] && echo "✓ config/ exists" || echo "✗ config/ missing" | |
| [ -d "docs" ] && echo "✓ docs/ exists" || echo "✗ docs/ missing" | |
| [ -d "fonts" ] && echo "✓ fonts/ exists" || echo "✗ fonts/ missing" | |
| [ -d "external/core" ] && echo "✓ external/core/ exists" || echo "✗ external/core/ missing" | |
| - name: Prepare environment | |
| env: | |
| TZ: "America/Los_Angeles" | |
| run: | | |
| sudo ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime | |
| echo ${TZ} | sudo tee /etc/timezone | |
| sudo apt-get update -q | |
| sudo apt-get install -y -y --no-install-recommends \ | |
| ${{matrix.other_pkgs}} \ | |
| build-essential \ | |
| xorg-dev \ | |
| libmotif-dev \ | |
| libfreetype6-dev \ | |
| cmake \ | |
| git \ | |
| xwit \ | |
| xfonts-base \ | |
| xfonts-75dpi \ | |
| xfonts-100dpi \ | |
| tzdata \ | |
| libcurl4-gnutls-dev | |
| - name: Configure build | |
| env: | |
| CC: ${{matrix.cc}} | |
| CXX: ${{matrix.cxx}} | |
| CXXFLAGS: ${{matrix.cxxflags}} | |
| # Note: $GITHUB_WORKSPACE is the actual repository root | |
| run: | | |
| echo "Current directory: $(pwd)" | |
| echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE" | |
| if [ -d "viewtouchFork" ]; then | |
| echo "Found viewtouchFork subdirectory, changing into it..." | |
| cd viewtouchFork | |
| fi | |
| echo "Now in: $(pwd)" | |
| cmake -S . -B _build_${{matrix.cxx}}_${{matrix.std}} \ | |
| -DCMAKE_INSTALL_PREFIX="${PWD}/_install_${{matrix.cxx}}_${{matrix.std}}" \ | |
| -DCMAKE_BUILD_TYPE="${{matrix.build_type}}" \ | |
| -DCMAKE_CXX_STANDARD=${{matrix.std}} \ | |
| -DCMAKE_CXX_EXTENSIONS=OFF \ | |
| -DCMAKE_VERBOSE_MAKEFILE=ON | |
| - name: Build + install | |
| run: | | |
| echo "Current directory: $(pwd)" | |
| if [ -d "viewtouchFork" ]; then | |
| echo "Found viewtouchFork subdirectory, changing into it..." | |
| cd viewtouchFork | |
| fi | |
| echo "Now in: $(pwd)" | |
| cmake --build _build_${{matrix.cxx}}_${{matrix.std}} -j2 | |
| cmake --build _build_${{matrix.cxx}}_${{matrix.std}} --target install |