mirror of
https://github.com/xenia-project/xenia.git
synced 2026-02-05 15:24:16 +01:00
88 lines
2.6 KiB
YAML
88 lines
2.6 KiB
YAML
name: Linux build
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '.clang-format'
|
|
- '.drone.star'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.gdbinit'
|
|
- '.github/*'
|
|
- '.github/workflows/Windows_build.yml'
|
|
- '.github/*_TEMPLATE/**'
|
|
- '*.md'
|
|
- '*.yml'
|
|
- '*.txt'
|
|
- 'docs/**'
|
|
- 'src/**/*_windows.*'
|
|
- 'src/**/*_android.*'
|
|
- 'src/**/*_mac.*'
|
|
- 'LICENSE'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '.clang-format'
|
|
- '.drone.star'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.gdbinit'
|
|
- '.github/*'
|
|
- '.github/workflows/Windows_build.yml'
|
|
- '.github/*_TEMPLATE/**'
|
|
- '*.md'
|
|
- '*.yml'
|
|
- '*.txt'
|
|
- 'docs/**'
|
|
- 'src/**/*_windows.*'
|
|
- 'src/**/*_android.*'
|
|
- 'src/**/*_mac.*'
|
|
- 'LICENSE'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: Lint
|
|
run: ./xb lint --all
|
|
|
|
build-linux:
|
|
name: Build (Linux) # runner.os can't be used here
|
|
needs: lint
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set environment variables
|
|
run: |
|
|
LLVM_VERSION=19
|
|
echo "LLVM_VERSION=$LLVM_VERSION" >> $GITHUB_ENV
|
|
echo "UBUNTU_BASE=jammy" >> $GITHUB_ENV
|
|
echo "CC=clang-${LLVM_VERSION}" >> $GITHUB_ENV
|
|
echo "CXX=clang++-${LLVM_VERSION}" >> $GITHUB_ENV
|
|
echo "AR=llvm-ar-${LLVM_VERSION}" >> $GITHUB_ENV
|
|
- name: Setup
|
|
run: |
|
|
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
|
sudo apt-add-repository "deb http://apt.llvm.org/${UBUNTU_BASE}/ llvm-toolchain-${UBUNTU_BASE}-$LLVM_VERSION main"
|
|
sudo apt-get -y update
|
|
sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-dev libx11-xcb-dev clang-$LLVM_VERSION clang-format-$LLVM_VERSION llvm-$LLVM_VERSION ninja-build cmake
|
|
./xb setup
|
|
- name: Build
|
|
run: ./xb build --config=Release
|
|
- name: Prepare artifacts
|
|
id: prepare_artifacts
|
|
run: |
|
|
mkdir artifacts
|
|
cp build/bin/Linux/Release/xenia_canary artifacts/xenia_canary
|
|
- name: Upload xenia canary artifacts
|
|
if: steps.prepare_artifacts.outcome == 'success'
|
|
id: upload_artifacts
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: xenia_canary_linux
|
|
path: artifacts/
|
|
if-no-files-found: error |