fix(ci): add autotools system dependencies for gperf build #9
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: Build & Test | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| BUILD_TYPE: Release | |
| VCPKG_COMMIT_ID: "master" | |
| jobs: | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| # Windows Build | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| build-windows: | |
| name: Windows x64 | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout vcpkg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: microsoft/vcpkg | |
| ref: ${{ env.VCPKG_COMMIT_ID }} | |
| path: vcpkg | |
| - name: Bootstrap vcpkg | |
| run: .\vcpkg\bootstrap-vcpkg.bat -disableMetrics | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: ui/package-lock.json | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Cache vcpkg | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build/vcpkg_installed | |
| vcpkg/downloads | |
| vcpkg/buildtrees | |
| key: vcpkg-windows-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: vcpkg-windows- | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build ` | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ` | |
| -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" ` | |
| -DVCPKG_TARGET_TRIPLET=x64-windows ` | |
| -G "Visual Studio 17 2022" -A x64 | |
| - name: Build C++ Backend | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel | |
| - name: Build Web UI | |
| working-directory: ui | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build WPF Client | |
| run: dotnet build -c Release | |
| - name: Run Tests | |
| run: dotnet test -c Release --no-build --verbosity normal || true | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: E3Studio-windows-x64 | |
| path: | | |
| build/${{ env.BUILD_TYPE }}/E3Studio.exe | |
| build/${{ env.BUILD_TYPE }}/*.dll | |
| ui/dist/ | |
| bin/Release/net10.0-windows/ | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| # Linux Build | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| build-linux: | |
| name: Linux x64 | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout vcpkg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: microsoft/vcpkg | |
| ref: ${{ env.VCPKG_COMMIT_ID }} | |
| path: vcpkg | |
| - name: Bootstrap vcpkg | |
| run: ./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
| - name: Install System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential cmake git ninja-build \ | |
| libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev \ | |
| libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \ | |
| libfontconfig1-dev libssl-dev pkg-config \ | |
| autoconf autoconf-archive automake libtool | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: ui/package-lock.json | |
| - name: Cache vcpkg | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build/vcpkg_installed | |
| vcpkg/downloads | |
| vcpkg/buildtrees | |
| key: vcpkg-linux-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: vcpkg-linux- | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" \ | |
| -DVCPKG_TARGET_TRIPLET=x64-linux \ | |
| -G Ninja | |
| - name: Build C++ Backend | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel | |
| - name: Build Web UI | |
| working-directory: ui | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Run Tests | |
| run: | | |
| cd build | |
| ctest --output-on-failure || true | |
| - name: Package | |
| run: | | |
| mkdir -p package/E3Studio | |
| cp build/bin/E3Studio package/E3Studio/ | |
| cp -r ui/dist package/E3Studio/ui | |
| cp launch.sh package/E3Studio/ | |
| chmod +x package/E3Studio/E3Studio | |
| chmod +x package/E3Studio/launch.sh | |
| tar -czf E3Studio-linux-x64.tar.gz -C package E3Studio | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: E3Studio-linux-x64 | |
| path: | | |
| build/bin/E3Studio | |
| ui/dist/ | |
| E3Studio-linux-x64.tar.gz | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| # macOS Build (Apple Silicon) | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| build-macos-arm64: | |
| name: macOS ARM64 | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout vcpkg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: microsoft/vcpkg | |
| ref: ${{ env.VCPKG_COMMIT_ID }} | |
| path: vcpkg | |
| - name: Bootstrap vcpkg | |
| run: ./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
| - name: Install System Dependencies | |
| run: | | |
| brew install cmake ninja node autoconf autoconf-archive automake libtool | |
| - name: Cache vcpkg | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build/vcpkg_installed | |
| vcpkg/downloads | |
| vcpkg/buildtrees | |
| key: vcpkg-macos-arm64-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: vcpkg-macos-arm64- | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" \ | |
| -DVCPKG_TARGET_TRIPLET=arm64-osx \ | |
| -G Ninja | |
| - name: Build C++ Backend | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel | |
| - name: Build Web UI | |
| working-directory: ui | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Package | |
| run: | | |
| mkdir -p package/E3Studio | |
| cp build/bin/E3Studio package/E3Studio/ | |
| cp -r ui/dist package/E3Studio/ui | |
| cp launch.sh package/E3Studio/ | |
| chmod +x package/E3Studio/E3Studio | |
| chmod +x package/E3Studio/launch.sh | |
| tar -czf E3Studio-macos-arm64.tar.gz -C package E3Studio | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: E3Studio-macos-arm64 | |
| path: | | |
| build/bin/E3Studio | |
| ui/dist/ | |
| E3Studio-macos-arm64.tar.gz | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| # macOS Build (Intel) | |
| # ═══════════════════════════════════════════════════════════════════════════ | |
| build-macos-x64: | |
| name: macOS x64 (Intel) | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout vcpkg | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: microsoft/vcpkg | |
| ref: ${{ env.VCPKG_COMMIT_ID }} | |
| path: vcpkg | |
| - name: Bootstrap vcpkg | |
| run: ./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
| - name: Install System Dependencies | |
| run: | | |
| brew install cmake ninja node autoconf autoconf-archive automake libtool | |
| - name: Cache vcpkg | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| build/vcpkg_installed | |
| vcpkg/downloads | |
| vcpkg/buildtrees | |
| key: vcpkg-macos-x64-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: vcpkg-macos-x64- | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" \ | |
| -DVCPKG_TARGET_TRIPLET=x64-osx \ | |
| -G Ninja | |
| - name: Build C++ Backend | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel | |
| - name: Build Web UI | |
| working-directory: ui | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Package | |
| run: | | |
| mkdir -p package/E3Studio | |
| cp build/bin/E3Studio package/E3Studio/ | |
| cp -r ui/dist package/E3Studio/ui | |
| cp launch.sh package/E3Studio/ | |
| chmod +x package/E3Studio/E3Studio | |
| chmod +x package/E3Studio/launch.sh | |
| tar -czf E3Studio-macos-x64.tar.gz -C package E3Studio | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: E3Studio-macos-x64 | |
| path: | | |
| build/bin/E3Studio | |
| ui/dist/ | |
| E3Studio-macos-x64.tar.gz |