Skip to content

Commit

Permalink
Rework CI cmake setup
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Dec 23, 2023
1 parent 68bbca2 commit 9df216c
Showing 1 changed file with 73 additions and 59 deletions.
132 changes: 73 additions & 59 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,89 @@ env:
DESTDIR: ${{ github.workspace }}/build/tmp

jobs:
macos-libs:
runs-on: macos-latest
linux:
strategy:
matrix:
include:
- container: debian:11
- container: debian:12
- container: ubuntu:20.04
- container: ubuntu:22.04
- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
brew install cmake fluid-synth liblo libmagic libsndfile pkg-config
apt-get update -qq
apt-get install -yqq cmake g++ libfluidsynth-dev liblo-dev libmagic-dev libsndfile1-dev libx11-dev lsb-release pkg-config
echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
- name: configure
run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=OFF
run: cmake -S cmake -B build
- name: build
run: cmake --build build -j $(sysctl -n hw.logicalcpu)
run: cmake --build build -j $(nproc)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: macos-libs
name: linux-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}

macos-frameworks:
macos:
strategy:
matrix:
include:
- frameworks: ON
- frameworks: OFF
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
brew install cmake fluid-synth liblo libmagic libsndfile pkg-config
if [ "${{ matrix.frameworks }}" = "" ]; then
echo "PACK_NAME=frameworks" >> "${GITHUB_ENV}"
else
echo "PACK_NAME=libs" >> "${GITHUB_ENV}"
fi
- name: configure
run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=ON
run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=${{ matrix.frameworks }}
- name: build
run: cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: macos-frameworks
name: macos-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}

mingw32-cross:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- container: debian:11
- container: debian:12
- container: ubuntu:20.04
- container: ubuntu:22.04
- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades cmake libc6:i386 libgcc-s1:i386 libstdc++6:i386 binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
dpkg --add-architecture i386
apt-get update -qq
apt-get install -yqq cmake binutils-mingw-w64-i686 g++-mingw-w64 lsb-release make mingw-w64 pkg-config
if [ "$(lsb_release -si 2>/dev/null)" = "Debian" ]; then
apt-get install -yqq wine wine32 wine64
else
apt-get install -yqq wine-stable
fi
echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
- name: configure
env:
PKG_CONFIG: false
Expand All @@ -70,19 +107,34 @@ jobs:
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: mingw32
name: mingw32-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}

mingw64-cross:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- container: debian:11
- container: debian:12
- container: ubuntu:20.04
- container: ubuntu:22.04
- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades cmake libc6:i386 libgcc-s1:i386 libstdc++6:i386 binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
dpkg --add-architecture i386
apt-get update -qq
apt-get install -yqq cmake binutils-mingw-w64-x86-64 g++-mingw-w64 lsb-release make mingw-w64 pkg-config
if [ "$(lsb_release -si 2>/dev/null)" = "Debian" ]; then
apt-get install -yqq wine wine32 wine64
else
apt-get install -yqq wine-stable
fi
echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
- name: configure
env:
PKG_CONFIG: false
Expand All @@ -101,45 +153,7 @@ jobs:
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: mingw64
path: ${{ env.DESTDIR }}

ubuntu-20_04:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq cmake libfluidsynth-dev liblo-dev libmagic-dev libsndfile1-dev libx11-dev pkg-config
- name: configure
run: cmake -S cmake -B build
- name: build
run: cmake --build build -j $(nproc)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: ubuntu-20.04
path: ${{ env.DESTDIR }}

ubuntu-22_04:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq cmake libfluidsynth-dev liblo-dev libmagic-dev libsndfile1-dev libx11-dev pkg-config
- name: configure
run: cmake -S cmake -B build
- name: build
run: cmake --build build -j $(nproc)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: ubuntu-22.04
name: mingw64-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}

windows:
Expand Down

0 comments on commit 9df216c

Please sign in to comment.