name: Linux on: [push, pull_request] permissions: contents: write jobs: Linux: runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6 with: ref: ${{ github.ref }} fetch-depth: 2 - name: Checkout submodules run: | git submodule update --init --recursive - name: Install dependencies run: | sudo add-apt-repository -y universe sudo add-apt-repository -y multiverse sudo apt update sudo apt install -y gcc-13 g++-13 wget libsdl2-2.0-0 libsdl2-dev mesa-utils xvfb gdb wget https://cdn.ensoft.dev/eepp-assets/premake-5.0.0-beta6-linux.tar.gz tar xvzf premake-5.0.0-beta6-linux.tar.gz - name: Build run: | ./premake5 --disable-static-build --with-debug-symbols gmake cd make/linux make all -j$(nproc) -e config=release_x86_64 - name: Set SDK version id: sdk_version run: | if [[ "$GITHUB_REF" == refs/tags/eepp-* ]]; then echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" else echo "version=nightly" >> "$GITHUB_OUTPUT" fi - name: Package eepp SDK if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' run: | bash projects/scripts/package_sdk.sh linux x86_64 --strip --version ${{ steps.sdk_version.outputs.version }} - name: Upload SDK package if: always() uses: actions/upload-artifact@v4 with: name: linux-eepp-sdk-x86_64 path: projects/linux/sdk/eepp-sdk-*.tar.gz - name: Publish nightly SDK package if: github.ref == 'refs/heads/develop' uses: softprops/action-gh-release@v3 with: tag_name: ${{ steps.sdk_version.outputs.version }} draft: false prerelease: true generate_release_notes: false fail_on_unmatched_files: true files: | projects/linux/sdk/eepp-sdk-linux-x86_64-nightly.tar.gz - name: Publish stable release package if: startsWith(github.ref, 'refs/tags/eepp-') uses: softprops/action-gh-release@v3 with: tag_name: ${{ steps.sdk_version.outputs.version }} draft: false prerelease: false generate_release_notes: false fail_on_unmatched_files: true files: | projects/linux/sdk/eepp-sdk-linux-x86_64-*.tar.gz - name: Unit Tests run: | cd projects/scripts bash ./run_gdb_tests.sh - name: Upload artifacts if: always() uses: actions/upload-artifact@v4 with: name: linux-test-output path: bin/unit_tests/output/*