Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

185 windows fix dynamic libraries build #186

Merged
merged 19 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5f3f64c
ci: build, don't use arguments for buildtype and default_library
Totto16 Oct 2, 2024
e85fbe1
ci: installer, don't use matrix build, as it is only one config
Totto16 Oct 2, 2024
493f0a9
windows: support dll library for oopertis-core
Totto16 Oct 2, 2024
fc011bd
core: make StaticString a valid iterator
Totto16 Oct 2, 2024
dacd2d8
windows: support dll library for oopertis-recordings
Totto16 Oct 2, 2024
b218232
dependencies: always use a static discord lib, when using msvc
Totto16 Oct 2, 2024
c086ecd
fix: fix exported property on a function in core/helper/color.hpp
Totto16 Oct 2, 2024
a6d5501
windows: use seperate exported name for each library, core
Totto16 Oct 2, 2024
c6ee9fb
windows: use seperate exported name for each library, recordings
Totto16 Oct 2, 2024
5fc5558
windows: support dll library for oopertis-graphics, part1
Totto16 Oct 2, 2024
aed812a
windows: support dll library for oopertis-graphics, part2
Totto16 Oct 3, 2024
4ef349e
windows installer: add shared libraries to the install process
Totto16 Oct 3, 2024
17d30b8
installer: use files() to pose a correct dependency on the chnaging o…
Totto16 Oct 3, 2024
40cebf9
installer: support local and Ci vcredist files by using a compile tim…
Totto16 Oct 3, 2024
ffd7e2a
assets: update gamecontrollerdb.txt file
Totto16 Oct 3, 2024
08be3f5
linter: format all cpp and meson files
Totto16 Oct 3, 2024
4c52be1
lint: fix clang-tidy warnings
Totto16 Oct 3, 2024
7ed2b70
ci: use run command instead of action to install clang
Totto16 Oct 3, 2024
3c69e89
fix: fix tricky clang-format error
Totto16 Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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