Skip to content

Fix compilation error and optimize CI build performance #99

Fix compilation error and optimize CI build performance

Fix compilation error and optimize CI build performance #99

Workflow file for this run

name: C/C++ CI
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ runner.os }}
- name: Install dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
libtool \
build-essential \
pkg-config \
python3 \
libxml2-dev \
libxml2-utils \
gcc-multilib \
g++-multilib \
flex \
bison \
libx11-dev \
libx11-dev:i386 \
libfreetype-dev \
libfreetype-dev:i386 \
libdrm-dev \
libdrm-dev:i386 \
mingw-w64 \
clang-14 \
lld-14
# Use clang-14 as it's more stable with Wine's inline asm
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 100
- name: Generate configure script
run: ./autogen.sh
- name: configure
run: |
export PATH="/usr/lib/ccache:$PATH"
./configure CC="ccache gcc" CXX="ccache g++"
- name: make
run: make -j$(nproc)
- name: make check
run: make -j$(nproc) check
- name: make distcheck
run: make -j$(nproc) distcheck