[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
investigate viability of DLL for Matrix Control
Browse files Browse the repository at this point in the history
working Matrix Control

build DLL with MSBuild

remove test binary and add workflows
  • Loading branch information
zllovesuki committed Dec 6, 2020
1 parent d6d6571 commit 9a53a80
Show file tree
Hide file tree
Showing 16 changed files with 868 additions and 24 deletions.
7 changes: 6 additions & 1 deletion .github/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@ Invoke-Expression $BUILD
Write-Host "Building debug release"

$BUILD_DEBUG = "go build -ldflags=`"-X 'main.Version=$env:GITHUB_REF'`" -o build/G14Manager.debug.exe ."
Invoke-Expression $BUILD_DEBUG
Invoke-Expression $BUILD_DEBUG

Write-Host "Building DLLs"

$BUILD_MATRIX_RELEASE_DLL = "MSBuild.exe .\cxx\MatrixController\MatrixController.sln /property:Configuration=Release /property:Platform=x64"
Invoke-Expression $BUILD_MATRIX_RELEASE_DLL
36 changes: 25 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
on:
push:
tags:
- 'v*'
- "v*"
name: Build Release
jobs:
test:
name: Test before build
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.15.2' # The Go version to download (if necessary) and use.
go-version: "1.15.5" # The Go version to download (if necessary) and use.
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: test packages
run: go test .\...
- name: Build MatrixControl DLL (Debug)
run: MSBuild.exe .\cxx\MatrixController\MatrixController.sln /property:Configuration=Debug /property:Platform=x64
publish:
name: Create release-artifacts
runs-on: windows-latest
needs: test
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.15.2' # The Go version to download (if necessary) and use.
go-version: "1.15.5" # The Go version to download (if necessary) and use.
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Build Artifacts
shell: powershell
run: .\.github\build.ps1
Expand All @@ -33,9 +42,9 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
console.log({ owner, repo, sha });
Expand All @@ -52,8 +61,13 @@ jobs:
});
console.log('created release', { release });
for (let file of await fs.readdir('./build/')) {
let files = [];
files.push(await fs.readdir('./build/'))
files.push('./cxx/MatrixController/x64/Release/MatrixController.dll')
for (let file of files) {
console.log('uploading', file);
await github.repos.uploadReleaseAsset({
Expand All @@ -62,4 +76,4 @@ jobs:
name: file,
data: await fs.readFile(`./build/${file}`)
});
}
}
28 changes: 17 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
strategy:
matrix:
go-version: [1.15.x]
go-version: [1.15.5]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: go test ./...
- name: Build
run: go build .
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Checkout code
uses: actions/checkout@v2
- name: Test G14Manager
run: go test ./...
- name: Build Main G14Manager Binary
run: go build .
- name: Build MatrixControl DLL (Release)
run: MSBuild.exe .\cxx\MatrixController\MatrixController.sln /property:Configuration=Release /property:Platform=x64
- name: Build MatrixControl DLL (Debug)
run: MSBuild.exe .\cxx\MatrixController\MatrixController.sln /property:Configuration=Debug /property:Platform=x64
63 changes: 62 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,65 @@ Session.vim
*.syso
build/
rnd/
.vscode
.vscode

*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates

.vs/

[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
25 changes: 25 additions & 0 deletions cxx/MatrixController/MatrixController.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30330.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MatrixController", "MatrixController\MatrixController.vcxproj", "{339B2A80-4BC0-4581-B27D-106DACFB3BE7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{339B2A80-4BC0-4581-B27D-106DACFB3BE7}.Debug|x64.ActiveCfg = Debug|x64
{339B2A80-4BC0-4581-B27D-106DACFB3BE7}.Debug|x64.Build.0 = Debug|x64
{339B2A80-4BC0-4581-B27D-106DACFB3BE7}.Release|x64.ActiveCfg = Release|x64
{339B2A80-4BC0-4581-B27D-106DACFB3BE7}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {00CF4491-5577-4225-AC92-C1B59DBAC5C2}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 9a53a80

Please sign in to comment.