Skip to content

Commit

Permalink
Add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Dec 24, 2023
1 parent b7f7c68 commit 89fe433
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

on:
push:
branches:
- master
- docs
paths:
- '**.yml'
- 'include/**'
- 'src/**'
pull_request:
branches:
- master
paths:
- '**.yml'
- 'include/**'
- 'src/**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish-doc:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Install latest CMake and Ninja
uses: lukka/[email protected]

- name: Install vcpkg
uses: lukka/run-vcpkg@v11

- name: Build with CMake
run: |
cmake -S . -B build/ninja/ -GNinja
cmake -S . -B build/platform/
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3")

# C++ Compiler options
add_compile_options(-Wall)
add_compile_options(-Wextra)
add_compile_options(-pedantic)
add_compile_options(-Wno-unused-parameter)
add_compile_options(-Wno-uninitialized)
add_compile_options(-Wno-missing-field-initializers)

# vcpkg (preparation)
include($ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
Expand Down
10 changes: 10 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
* Copyright 2023 the JayCeS authors. All rights reserved. MIT license.
*/

#include <cstring>
#include <iostream>
#include <CLI/CLI.hpp>

#include <llvm/ADT/Optional.h>

auto main(int argc, char** argv) -> int {
CLI::App app{"App description"};
char** original_argv = argv;

std::string filename = "default";
app.add_option("-f,--file", filename, "A help string");

CLI11_PARSE(app, argc, argv);
return 0;
}

0 comments on commit 89fe433

Please sign in to comment.