[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
resolve test.yml conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
zllovesuki committed Dec 7, 2020
2 parents fbbd7cf + 36eb7f1 commit 85cb04a
Show file tree
Hide file tree
Showing 24 changed files with 2,385 additions and 44 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.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.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/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}`)
});
}
}
16 changes: 11 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ 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: Install Protoc
uses: arduino/setup-protoc@v1
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Checkout code
uses: actions/checkout@v2
- name: Generate protobuf
run: make proto_windows
- name: Test
- name: Test G14Manager
run: go test ./...
- name: Build
- name: Build Main G14Manager Binary
run: go build .
- name: Build MatrixControl DLL (Release)
run: MSBuild.exe .\cxx\MatrixController.sln /property:Configuration=Release /property:Platform=x64
- name: Build MatrixControl DLL (Debug)
run: MSBuild.exe .\cxx\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
Loading

0 comments on commit 85cb04a

Please sign in to comment.