Skip to content

try another flag

try another flag #9

Workflow file for this run

name: linux-build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: >-
sudo apt-get update --allow-releaseinfo-change &&
sudo apt-get install -y
cmake ninja-build build-essential git pkg-config
libasound2-dev libpulse-dev libudev-dev libx11-dev libxext-dev
libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxtst-dev
libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev
libegl1-mesa-dev libgl1-mesa-dev
libflac-dev libogg-dev libvorbis-dev libmpg123-dev libopusfile-dev
libxmp-dev
- name: Build SDL3
run: |
mkdir -p /tmp/sdl3
cd /tmp/sdl3
git clone --depth 1 --branch release-3.4.0 https://github.com/libsdl-org/SDL.git
cmake -S SDL -B SDL/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build SDL/build
sudo cmake --install SDL/build
- name: Build SDL3_mixer
run: |
mkdir -p /tmp/sdl3
cd /tmp/sdl3
git clone --depth 1 https://github.com/libsdl-org/SDL_mixer.git
cmake -S SDL_mixer -B SDL_mixer/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DSDLMIXER_VENDORED=OFF -DSDLMIXER_MOD_XMP=ON -DSDLMIXER_MOD_XMP_LITE=OFF -DSDLMIXER_MOD_XMP_SHARED=OFF
cmake --build SDL_mixer/build
sudo cmake --install SDL_mixer/build
- name: Configure
run: cmake -S . -B build -G Ninja
- name: Build
run: cmake --build build
- name: Discord notification
if: always() && env.DISCORD_WEBHOOK_URL != ''
shell: pwsh
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
$status = if ("${{ job.status }}" -eq "success") { "Success" } else { "Failure" }
$color = if ("${{ job.status }}" -eq "success") { 3066993 } else { 15158332 }
$title = "Linux build $status"
$runUrl = "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
$payload = @{
username = "GitHub Actions"
embeds = @(
@{
title = $title
url = $runUrl
color = $color
fields = @(
@{ name = "Commit"; value = "${{ github.sha }}"; inline = $true }
@{ name = "Branch"; value = "${{ github.ref_name }}"; inline = $true }
)
}
)
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method Post -Uri $env:DISCORD_WEBHOOK_URL -ContentType "application/json" -Body $payload