Skip to content

Commit

Permalink
add gui (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
petiaccja authored Mar 23, 2024
1 parent e096d95 commit 7d0acf1
Show file tree
Hide file tree
Showing 68 changed files with 6,322 additions and 27 deletions.
77 changes: 71 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- master

jobs:
build-test:
build-test-core:
strategy:
fail-fast: false
matrix:
Expand All @@ -36,7 +36,7 @@ jobs:
conan_preset: msvc-20-release
os: windows-latest

name: ${{ matrix.build_profile }}
name: core-${{ matrix.build_profile }}

runs-on: ${{matrix.os}}

Expand Down Expand Up @@ -90,14 +90,79 @@ jobs:
- name: Build
run: |
cmake --build --preset conan-${{ matrix.conan_preset }}
cmake -E make_directory ${{runner.workspace}}/install/SEDManager
cmake --install ${{github.workspace}}/build/${{ matrix.conan_preset }} --prefix '${{runner.workspace}}/install/SEDManager'
cmake -E make_directory ${{github.workspace}}/install/SEDManager
cmake --install ${{github.workspace}}/build/${{ matrix.conan_preset }} --prefix '${{github.workspace}}/install/SEDManager'
- name: Test
run: ${{github.workspace}}/build/${{ matrix.conan_preset }}/bin/Test

- name: Upload artifact binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: SEDManager-${{ matrix.build_profile }}
path: '${{runner.workspace}}/install/SEDManager'
path: '${{github.workspace}}/install/SEDManager'
if-no-files-found: error

build-test-flutter:
strategy:
fail-fast: false
matrix:
flutter_target: [windows, linux]
include:
- flutter_target: linux
os: ubuntu-latest
binary_path: build/linux/x64/release/bundle
core_profile: clang20d
- flutter_target: windows
os: windows-latest
binary_path: build/windows/x64/runner/Release
core_profile: msvc20d

name: flutter-${{ matrix.flutter_target }}
needs: [build-test-core]
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.9'
channel: 'stable'

- name: Install native compilers
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install ninja-build
sudo apt install gcc-13 g++-13
sudo apt install libgtk-3-dev
sudo update-alternatives --remove-all gcc || true
sudo update-alternatives --remove-all g++ || true
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10 --slave /usr/bin/g++ g++ /usr/bin/g++-13

- name: "Download core"
uses: actions/download-artifact@v4
with:
name: SEDManager-${{ matrix.core_profile }}
path: ${{github.workspace}}/core

- name: "Install GUI Dart dependencies"
working-directory: ${{github.workspace}}/src/SEDManagerGUI
run: flutter pub get

- name: "Test GUI"
working-directory: ${{github.workspace}}/src/SEDManagerGUI
run: flutter test --dart-define=CAPI_LIBRARY_PATH=${{github.workspace}}/core

- name: "Build GUI"
working-directory: ${{github.workspace}}/src/SEDManagerGUI
run: flutter build ${{matrix.flutter_target}} --release

- name: "Upload artifact binary"
uses: actions/upload-artifact@v4
with:
name: SEDManagerGUI-${{matrix.flutter_target}}
path: "${{github.workspace}}/src/SEDManagerGUI/${{matrix.binary_path}}"
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
directory: ${{ runner.temp }}/llvm
- name: Verify formatting
run: |
python ./support/run-clang-format.py -r src
python ./support/run-clang-format.py -r src --exclude "**/SEDManagerGUI/**"
python ./support/run-clang-format.py -r test
53 changes: 38 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,50 @@ jobs:
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: Download artifacts
- name: Download Windows core
uses: actions/download-artifact@v4
with:
name: SEDManager-msvc20r
path: ${{github.workspace}}/SEDManager_Windows_x86_64
github-token: ${{github.token}}
run-id: ${{ github.event.workflow_run.id }}

- name: Download Windows flutter
uses: actions/download-artifact@v4
with:
name: SEDManagerGUI-windows
path: ${{github.workspace}}/SEDManager_Windows_x86_64
github-token: ${{github.token}}
run-id: ${{ github.event.workflow_run.id }}

- name: Download Linux core
uses: actions/download-artifact@v4
with:
name: SEDManager-clang20r
path: ${{github.workspace}}/SEDManager_Linux_x86_64
github-token: ${{github.token}}
run-id: ${{ github.event.workflow_run.id }}

- name: Download Linux flutter
uses: actions/download-artifact@v4
with:
name: SEDManagerGUI-linux
path: ${{github.workspace}}/SEDManager_Linux_x86_64
github-token: ${{github.token}}
run-id: ${{ github.event.workflow_run.id }}

- name: Zip artifacts
shell: bash
working-directory: ${{github.workspace}}
run: |
mkdir -p ./Binaries/Windows_x86_64
mkdir -p ./Binaries/Linux_x86_64
gh run download ${{ github.event.workflow_run.id }} --dir ./Binaries/Windows_x86_64 -p *windows*cl*Release*20
gh run download ${{ github.event.workflow_run.id }} --dir ./Binaries/Linux_x86_64 -p *ubuntu*clang*Release*20
mv ./Binaries/Windows_x86_64/SEDManager* ./Binaries/Windows_x86_64/SEDManager
mv ./Binaries/Linux_x86_64/SEDManager* ./Binaries/Linux_x86_64/SEDManager
cd ./Binaries/Windows_x86_64
zip -r SEDManager_Windows_x86_64.zip SEDManager
cd ../..
cd ./Binaries/Linux_x86_64
zip -r SEDManager_Linux_x86_64.zip SEDManager
cd ../..
zip -r SEDManager_Windows_x86_64.zip SEDManager_Windows_x86_64
zip -r SEDManager_Linux_x86_64.zip SEDManager_Linux_x86_64
- name: Create release
shell: bash
run: |
gh release create ${{ github.event.workflow_run.head_branch }}
gh release upload ${{ github.event.workflow_run.head_branch }} ./Binaries/Windows_x86_64/SEDManager_Windows_x86_64.zip#SEDManager_Windows_x86_64
gh release upload ${{ github.event.workflow_run.head_branch }} ./Binaries/Linux_x86_64/SEDManager_Linux_x86_64.zip#SEDManager_Linux_x86_64
gh release upload ${{ github.event.workflow_run.head_branch }} ${{github.workspace}}/SEDManager_Windows_x86_64.zip#SEDManager_Windows_x86_64
gh release upload ${{ github.event.workflow_run.head_branch }} ${{github.workspace}}/SEDManager_Linux_x86_64.zip#SEDManager_Linux_x86_64
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,4 @@ add_subdirectory(test)

install(
TARGETS SEDManagerCLI SEDManagerCAPI DESTINATION "."
RUNTIME_DEPENDENCIES
PRE_EXCLUDE_REGEXES "ext-ms-.*" "api-ms-.*" "hvsifiletrust.dll" "pdmutilities.dll"
DIRECTORIES ${EXTRA_RUNTIME_DEPENDENCY_DIRS}
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"
DESTINATION "."
)
45 changes: 45 additions & 0 deletions src/SEDManagerGUI/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
*.lock

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
28 changes: 28 additions & 0 deletions src/SEDManagerGUI/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Binary file added src/SEDManagerGUI/fonts/CascadiaMono.ttf
Binary file not shown.
Binary file added src/SEDManagerGUI/fonts/CascadiaMonoItalic.ttf
Binary file not shown.
Loading

0 comments on commit 7d0acf1

Please sign in to comment.