Skip to content

Commit

Permalink
Fixes (#40) (#41)
Browse files Browse the repository at this point in the history
* use the latest common actions

* fix windows exports for static and shared library
  • Loading branch information
EddyTheCo authored Jan 6, 2025
1 parent 1cdc987 commit 9c0b3fb
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 76 deletions.
55 changes: 7 additions & 48 deletions .github/workflows/build-test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,27 @@ on:
tags:
- 'v*'
pull_request:
branches: [develop]
branches: [main,develop]
jobs:
build_test_package:
strategy:
matrix:
os: [ubuntu-latest,macos-latest,windows-latest]

uses: EddyTheCo/Common/.github/workflows/[email protected].1
uses: EddyTheCo/Common/.github/workflows/[email protected].2
with:
os: ${{ matrix.os }}
qtVersion: '6.8.1'
qtModules: 'qtshadertools'

release:
release-deploy:
if: startsWith(github.ref, 'refs/tags/v')
needs: build_test_package
runs-on: ubuntu-latest

needs: [build_test_package]
uses: EddyTheCo/Common/.github/workflows/[email protected]
with:
release: true
permissions:
contents: write
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:

- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
path: artifacts

- name: Move repositories to webpage
run: |
mv artifacts/common/html github-pages
mv artifacts/common .
mkdir github-pages/packages/ ${{runner.temp}}/platforms/
mv artifacts/*/_CPack_Packages/* ${{runner.temp}}/platforms/
for i in ${{runner.temp}}/platforms/*; do mv $i/IFW/*/repository/* $i/; rm -rf $i/IFW $i/TGZ; done;
mv ${{runner.temp}}/platforms/* github-pages/packages/
rm -rf artifacts/*/_CPack_Packages
- name: Package github-page
working-directory: ${{ github.workspace }}/github-pages/
run: |
cmake -E make_directory ${{runner.temp}}/page-packages
cmake -E tar c ${{runner.temp}}/page-packages/github-pages.tar -- .
- name: Releases
uses: softprops/action-gh-release@v2
with:
files: ./artifacts/*/*
body_path: ./common/CHANGELOG.md

- uses: actions/upload-artifact@v4
with:
name: 'github-pages'
path: ${{runner.temp}}/page-packages/*

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [develop]
jobs:
checkout-format-pr:
uses: EddyTheCo/Common/.github/workflows/[email protected].0
uses: EddyTheCo/Common/.github/workflows/[email protected].2
if: ${{ (github.event.pull_request.merged == true) && (startsWith(github.base_ref, 'develop')) }}
permissions:
contents: write
Expand Down
24 changes: 2 additions & 22 deletions .github/workflows/qml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,9 @@ on:
types:
- completed
jobs:
download-comment:
runs-on: ubuntu-latest
qmllint-comment:
uses: EddyTheCo/Common/.github/workflows/[email protected]
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
actions: read
pull-requests: write
steps:
- name: 'Download artifact'
uses: actions/download-artifact@v4
with:
name: common
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Read pr number
id: getprn
run: |
cat pr_number
echo "prn=$(cat pr_number)" >> $GITHUB_OUTPUT
- name: 'Run reviewer'
uses: EddyTheCo/qmllint-action/@v0.1.0
with:
jsondir: ${{ github.workspace }}
pr_number: ${{ steps.getprn.outputs.prn }}

15 changes: 15 additions & 0 deletions .github/workflows/recreate-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Auto-Create Develop Branch
run-name: Recreating develop branch

on:
pull_request_target:
types: [closed]
branches: [main]

jobs:
create-develop-branch:
uses: EddyTheCo/Common/.github/workflows/[email protected]
if: ${{ (github.event.pull_request.merged == true) && (startsWith(github.base_ref, 'main')) && (startsWith(github.head_ref, 'develop'))}}
permissions:
contents: write

7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ if(OPENSSL_FOUND
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")

target_link_libraries(Vault PUBLIC Qt6::Core Qt6::Network OpenSSL::Crypto)
target_compile_definitions(Vault PRIVATE WINDOWS_VAULT)
target_compile_definitions(
Vault
PUBLIC
$<IF:$<AND:$<BOOL:WIN32>,$<STREQUAL:$<TARGET_PROPERTY:Vault,TYPE>,SHARED_LIBRARY>>,VAULT_SHARED,>
)
target_compile_definitions(Vault PRIVATE WINDOWS_EXPORT)
if(EMSCRIPTEN)
target_compile_definitions(Vault PRIVATE USE_EMSCRIPTEN)
endif(EMSCRIPTEN)
Expand Down
13 changes: 9 additions & 4 deletions include/esterv/crypto/vault.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@
#include <QtQml>
#endif

#if defined(WINDOWS_VAULT)
#define QVAULT_EXPORT Q_DECL_EXPORT
#if defined(VAULT_SHARED)
#include <QtCore/QtGlobal>
#ifdef WINDOWS_EXPORT
#define VAULT_EXPORT Q_DECL_EXPORT
#else
#define QVAULT_EXPORT Q_DECL_IMPORT
#define VAULT_EXPORT Q_DECL_IMPORT
#endif
#else
#define VAULT_EXPORT
#endif

namespace Esterv::Crypto
{

class QVAULT_EXPORT Vault : public QObject
class VAULT_EXPORT Vault : public QObject
{

Q_OBJECT
Expand Down

0 comments on commit 9c0b3fb

Please sign in to comment.