Skip to content

Commit

Permalink
Merge pull request #186 from OpenBrickProtocolFoundation/185-windows-…
Browse files Browse the repository at this point in the history
…fix-dynamic-libraries-build

185 windows fix dynamic libraries build
  • Loading branch information
Totto16 authored Oct 3, 2024
2 parents e8a16dc + 3c69e89 commit 2b12c9d
Show file tree
Hide file tree
Showing 113 changed files with 1,349 additions and 998 deletions.
34 changes: 9 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,56 @@ jobs:
fail-fast: false
matrix:
config:
- name: Windows MSVC Release
- name: Windows MSVC
os: windows
os-version: 2022
environment: msvc
buildtype: release
library_type: static
shell: pwsh

- name: Windows MingGW Release
- name: Windows MingGW
os: windows
os-version: 2022
environment: mingw
architecture: x86_64
buildtype: release
library_type: static
shell: 'msys2 {0}'

- name: Windows UCRT Release
- name: Windows UCRT
os: windows
os-version: 2022
environment: ucrt
architecture: ucrt-x86_64
buildtype: release
library_type: static
shell: 'msys2 {0}'

- name: Linux Release
- name: Linux
os: ubuntu
os-version: 24.04
buildtype: release
use-clang: false
library_type: shared
shell: bash

- name: Linux Clang Release (libstdc++)
- name: Linux Clang (libstdc++)
os: ubuntu
os-version: 24.04
buildtype: release
use-clang: true
use-clang_stdlib: false
library_type: shared
shell: bash

- name: Linux Clang Release (libc++)
- name: Linux Clang (libc++)
os: ubuntu
os-version: 24.04
buildtype: release
use-clang: true
use-clang_stdlib: true
library_type: shared
shell: bash

- name: MacOS Release
- name: MacOS
os: macos
os-version: 13
arm: false
buildtype: release
library_type: shared
shell: bash

- name: MacOS Release (Arm64)
- name: MacOS (Arm64)
os: macos
os-version: 14
arm: true
buildtype: release
library_type: shared
shell: bash

defaults:
Expand Down Expand Up @@ -203,7 +187,7 @@ jobs:
brew install sdl2 sdl2_ttf sdl2_mixer sdl2_image
- name: Configure
run: meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }}

- name: Build
run: meson compile -C build
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ jobs:
pip install meson --break-system-packages
- name: Setup Clang
uses: egor-tensin/setup-clang@v1
with:
version: 19
platform: x64
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
echo "CC=clang-19" >> "$GITHUB_ENV"
echo "CXX=clang++-19" >> "$GITHUB_ENV"
echo "OBJC=clang-19" >> "$GITHUB_ENV"
- name: Prepare compile_commands.json
run: |
Expand All @@ -44,7 +47,7 @@ jobs:
database: build
files-changed-only: ${{ github.event_name != 'workflow_dispatch' }}
lines-changed-only: ${{ github.event_name != 'workflow_dispatch' }}
thread-comments: true
thread-comments: update
tidy-checks: ''
step-summary: true
file-annotations: true
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,30 @@ on:

jobs:
installer:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}-${{ matrix.config.os-version }}
name: Windows MSVC Installer
runs-on: windows-2022

strategy:
fail-fast: false
matrix:
config:
- name: Windows MSVC Installer
os: windows
os-version: 2022
msvc: true
buildtype: release
library_type: static
shell: pwsh
defaults:
run:
shell: ${{ matrix.config.shell }}
shell: pwsh

steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Setup MSVC (Windows)
if: matrix.config.os == 'windows' && matrix.config.msvc == true
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
toolset: '14.41'

- name: Setup meson
if: matrix.config.os != 'macos'
run: |
pip install meson
- name: Configure
run: meson setup build -Dbuildtype=${{ matrix.config.buildtype }} -Ddefault_library=${{ matrix.config.library_type }} -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Dbuild_installer=true
run: meson setup build -Dbuildtype=release -Ddefault_library=shared -Dbuild_installer=true

- name: Build
run: meson compile -C build
Expand All @@ -65,7 +52,6 @@ jobs:
- name: Upload artifacts - Windows
uses: actions/upload-artifact@v4
if: matrix.config.os == 'windows'
with:
name: ${{ matrix.config.name }}
name: OOpetris Setup
path: tools/installer/OOPetris Setup.exe
Loading

0 comments on commit 2b12c9d

Please sign in to comment.