Skip to content

Commit

Permalink
.github/workflows/cmake: create
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsh committed Oct 22, 2023
1 parent 73d3ab5 commit 960cddc
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
1 change: 1 addition & 0 deletions .cmake-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
line_width: 100
36 changes: 36 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
env:
BUILD_TYPE: Release
jobs:
build:
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Latest Tag
id: latest_tag
uses: WyriHaximus/github-action-get-previous-tag@v1
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
- name: Package
run: cpack -C ${{env.BUILD_TYPE}} --config ${{github.workspace}}/build/CPackConfig.cmake
- name: Upload package
uses: softprops/action-gh-release@v1
with:
files: |
${{steps.fixed_workspace.outputs.out}}/winprefs-*.exe
${{steps.fixed_workspace.outputs.out}}/winprefs-*.zip
tag_name: ${{ steps.latest_tag.outputs.tag }}
name: Build
'on':
pull_request:
branches:
- master
push:
branches:
- master
4 changes: 4 additions & 0 deletions .vscode/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ codeql
color
colors
cond
cpack
csidl
datetime
dcmake
Expand Down Expand Up @@ -37,6 +38,7 @@ mscgen
msvc
msvcrt
municode
nsis
objbase
olaf
parens
Expand All @@ -54,6 +56,7 @@ sarif
securestring
shlwapi
snwprintf
softprops
startf
startupinfow
strequal
Expand Down Expand Up @@ -82,4 +85,5 @@ wuninitialized
wunknown
wunreachable
wunused
wyrihaximus
xapian
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"editor.wordWrapColumn": 100,
"eslint.lintTask.enable": true,
"files.associations": {
"*.h": "c"
"*.h": "c",
".cmake-format": "yaml"
},
"files.eol": "\n",
"files.insertFinalNewline": true,
Expand Down
28 changes: 28 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,31 @@ cmake_minimum_required(VERSION 3.26 FATAL_ERROR)
project(winprefs)

add_subdirectory(native)

set(CPACK_PACKAGE_NAME "winprefs")
set(CPACK_PACKAGE_VENDOR "Tatsh")
# FIXME include license file in zip FIXME install path should not have version number

# FIXME may need Visual C++ runtime

# FIXME missing license in installer

# FIXME NSIS does not create shortcut to app

# FIXME Set publisher

# FIXME Set 'file description'?

# FIXME Set Product name

# FIXME Set 'file version'?

# FIXME Set Product version

# FIXME Set Copyright

# FIXME Set language

# FIXME No UNIX-style packaging. Just have a single root.
set(CPACK_GENERATOR "NSIS;ZIP")
include(CPack)

0 comments on commit 960cddc

Please sign in to comment.