Skip to content

Commit

Permalink
feat: add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Nov 3, 2024
1 parent 3583c9a commit a1ec519
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 1 deletion.
72 changes: 72 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
on:
push:
workflow_dispatch:
inputs:
ref:
type: string
default: master
description: The ref of saucer to use

name: 🏗️ Build Module

jobs:
build:
strategy:
fail-fast: false

matrix:
backend: [WebKit, WebKitGtk, WebView2, Qt5, Qt6]
config: [Debug, Release]

include:
- backend: WebView2
platform: Windows
os: windows-latest

- backend: Qt5
platform: Linux
os: ubuntu-latest
container: archlinux:base-devel

- backend: Qt6
platform: Linux
os: ubuntu-latest
container: archlinux:base-devel

- backend: WebKitGtk
platform: Linux
os: ubuntu-latest
container: archlinux:base-devel

- backend: WebKit
platform: MacOS
os: macos-latest

runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
name: module-${{ matrix.backend }}-${{ matrix.config }}

steps:
- name: 📥 Checkout
uses: actions/checkout@v4

- name: 📥 Checkout Saucer
uses: actions/checkout@v4
with:
repository: "saucer/saucer"
sparse-checkout: ".github"
path: "actions"
ref: ${{ github.event.inputs.ref || 'master' }}

- name: 🛸 Setup Saucer
uses: ./actions/.github/actions/setup
with:
backend: ${{ matrix.backend }}
platform: ${{ matrix.platform }}
build-type: ${{ matrix.config }}

- name: 📦 Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Module (${{ matrix.backend }}-${{ matrix.config }})
path: build
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ project(saucer-desktop LANGUAGES CXX VERSION 1.0.0)
add_library(${PROJECT_NAME} STATIC)
add_library(saucer::desktop ALIAS ${PROJECT_NAME})

target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_23)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23)
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 23 CXX_EXTENSIONS OFF CXX_STANDARD_REQUIRED ON)

if (PROJECT_IS_TOP_LEVEL AND NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror -pedantic -pedantic-errors -Wfatal-errors)
endif()

# --------------------------------------------------------------------------------------------------------
# Include directories
# --------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit a1ec519

Please sign in to comment.