Skip to content

Commit

Permalink
feat: add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Sep 2, 2023
1 parent 6a20646 commit 208ee6a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
workflow_dispatch:
push:
branches: ["**"]
paths-ignore:
- "**/*.md"
pull_request:
branches: ["**"]

name: Build
jobs:
build:
runs-on: ubuntu-latest
container: greyltc/archlinux-aur:paru

strategy:
fail-fast: false
matrix:
language: ["cpp"]

steps:
- name: 📦 Checkout
uses: actions/checkout@v3

- name: 🏗️ Install build dependencies
run: "pacman --noconfirm -Syu base-devel cmake gcc git make mingw-w64 && aur-install mingw-w64-lua513"

- name: ⚒️ Compile
run: "mkdir build && cd build && cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain.cmake && cmake --build . --config Release"

- name: 🚀 Upload Artifact
uses: actions/upload-artifact@v3
with:
name: build
path: |
build/
!build/cmake
!build/_deps
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "iphlpapi")
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20 CXX_EXTENSIONS OFF CXX_STANDARD_REQUIRED ON)

if (NOT MSVC AND NOT IS_CI)
if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-missing-field-initializers -Wno-cast-function-type)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror -pedantic -pedantic-errors -Wfatal-errors)
endif()
Expand Down

0 comments on commit 208ee6a

Please sign in to comment.