mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-30 17:24:31 +01:00
msvc: add package function and tweak github action
This commit is contained in:
parent
a38ca51139
commit
a6fc7546fe
71
.github/workflows/vs-win.yml
vendored
71
.github/workflows/vs-win.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: git fetch --prune --unshallow --tags
|
run: git fetch --prune --unshallow --tags
|
||||||
|
|
||||||
- name: Initialize Build Environment
|
- name: Initialize build environment
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Init
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Init
|
||||||
|
|
||||||
@ -33,77 +33,35 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Build
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 Build
|
||||||
|
|
||||||
- name: Prepare Files For Packaging
|
- name: Prepare files for packaging
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: powershell -ExecutionPolicy Bypass -NoProfile -File .\msvc-build.ps1 PackageTmp
|
||||||
$fb2kFiles = @(
|
|
||||||
"ext_libs/*.dll",
|
|
||||||
"ext_libs/libspeex/*.dll",
|
|
||||||
"Release/foo_input_vgmstream.dll",
|
|
||||||
"README.md"
|
|
||||||
)
|
|
||||||
|
|
||||||
$cliFiles = @(
|
- name: Upload foobar2000 component artifact
|
||||||
"ext_libs/*.dll",
|
|
||||||
"ext_libs/libspeex/*.dll",
|
|
||||||
"Release/in_vgmstream.dll",
|
|
||||||
"Release/test.exe",
|
|
||||||
"Release/xmp-vgmstream.dll",
|
|
||||||
"COPYING",
|
|
||||||
"README.md"
|
|
||||||
)
|
|
||||||
|
|
||||||
$fb2kPdbFiles = @(
|
|
||||||
"Release/foo_input_vgmstream.pdb"
|
|
||||||
)
|
|
||||||
|
|
||||||
$cliPdbFiles = @(
|
|
||||||
"Release/in_vgmstream.pdb",
|
|
||||||
"Release/test.pdb",
|
|
||||||
"Release/xmp-vgmstream.pdb"
|
|
||||||
)
|
|
||||||
|
|
||||||
Compress-Archive $cliFiles Release/vgmstream-win.zip -Force
|
|
||||||
Compress-Archive $fb2kFiles Release/foo_input_vgmstream.zip -Force
|
|
||||||
Move-Item Release/foo_input_vgmstream.zip Release/foo_input_vgmstream.fb2k-component -Force
|
|
||||||
Compress-Archive $cliPdbFiles Release/test.pdb.zip -Force
|
|
||||||
Compress-Archive $fb2kPdbFiles Release/foo_input_vgmstream.pdb.zip -Force
|
|
||||||
|
|
||||||
mkdir tmp/cli
|
|
||||||
mkdir tmp/fb2k
|
|
||||||
mkdir tmp/cli-p
|
|
||||||
mkdir tmp/fb2k-p
|
|
||||||
|
|
||||||
Copy-Item $cliFiles tmp/cli/ -Recurse -Force
|
|
||||||
Copy-Item $fb2kFiles tmp/fb2k/ -Recurse -Force
|
|
||||||
Copy-Item $cliPdbFiles tmp/cli-p/ -Recurse -Force
|
|
||||||
Copy-Item $fb2kPdbFiles tmp/fb2k-p/ -Recurse -Force
|
|
||||||
|
|
||||||
- name: Upload foobar2000 Component Artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: foo_input_vgmstream.fb2k-component
|
name: foo_input_vgmstream.fb2k-component
|
||||||
path: ${{github.workspace}}\tmp\fb2k
|
path: ${{github.workspace}}\tmp\fb2k
|
||||||
|
|
||||||
- name: Upload CLI Tools Artifact
|
- name: Upload CLI tools artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test
|
name: vgmstream-win
|
||||||
path: ${{github.workspace}}\tmp\cli
|
path: ${{github.workspace}}\tmp\cli
|
||||||
|
|
||||||
- name: Upload foobar2000 Component Debug Symbols Artifact
|
- name: Upload foobar2000 component debug symbols artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: foo_input_vgmstream.pdb
|
name: foo_input_vgmstream.pdb
|
||||||
path: ${{github.workspace}}\tmp\fb2k-p
|
path: ${{github.workspace}}\tmp\fb2k-p
|
||||||
|
|
||||||
- name: Upload CLI Tools Debug Symbols Artifact
|
- name: Upload CLI tools bebug symbols artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test.pdb
|
name: vgmstream-win.pdb
|
||||||
path: ${{github.workspace}}\tmp\cli-p
|
path: ${{github.workspace}}\tmp\cli-p
|
||||||
|
|
||||||
- name: Upload Artifacts to S3
|
- name: Upload artifacts to S3
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
working-directory: ${{github.workspace}}
|
working-directory: ${{github.workspace}}
|
||||||
shell: powershell
|
shell: powershell
|
||||||
@ -112,10 +70,10 @@ jobs:
|
|||||||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
run: |
|
run: |
|
||||||
aws s3 cp Release\vgmstream-win.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\vgmstream-win.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
aws s3 cp Release\foo_input_vgmstream.fb2k-component s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\foo_input_vgmstream.fb2k-component s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
aws s3 cp Release\test.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\vgmstream-win.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
aws s3 cp Release\foo_input_vgmstream.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
aws s3 cp bin\foo_input_vgmstream.pdb.zip s3://vgmstream-builds/${{github.sha}}/windows/ --acl public-read
|
||||||
echo ${{github.sha}} | tee latest_id
|
echo ${{github.sha}} | tee latest_id
|
||||||
git describe --always | tee latest_ver
|
git describe --always | tee latest_ver
|
||||||
aws s3 cp latest_id s3://vgmstream-builds/ --acl public-read
|
aws s3 cp latest_id s3://vgmstream-builds/ --acl public-read
|
||||||
@ -126,4 +84,3 @@ jobs:
|
|||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
url: https://vgmstream-builds.losno.co/callFupa?secret=${{ secrets.FUPA_UPDATER_SECRET }}
|
url: https://vgmstream-builds.losno.co/callFupa?secret=${{ secrets.FUPA_UPDATER_SECRET }}
|
||||||
|
|
||||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -45,11 +45,17 @@ Release
|
|||||||
/xmplay/*.dll
|
/xmplay/*.dll
|
||||||
/dependencies
|
/dependencies
|
||||||
/version_auto.h
|
/version_auto.h
|
||||||
|
|
||||||
/msvc-build.config.ps1
|
/msvc-build.config.ps1
|
||||||
/msvc-build.log
|
/msvc-build.log
|
||||||
|
# for test batchs, note that already tracked files are never ignored
|
||||||
|
/msvc-build-*.bat
|
||||||
|
|
||||||
|
/bin/**/*
|
||||||
|
/tmp/**/*
|
||||||
/**/vgmstream-win.zip
|
/**/vgmstream-win.zip
|
||||||
/**/foo_input_vgmstream.fb2k-component
|
/**/foo_input_vgmstream.fb2k-component
|
||||||
|
|
||||||
|
# cmake stuff
|
||||||
/build
|
/build
|
||||||
/cmake-build*
|
/cmake-build*
|
@ -1,7 +1,7 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
Param(
|
Param(
|
||||||
[Parameter(Position=0, mandatory=$true)]
|
[Parameter(Position=0, mandatory=$true)]
|
||||||
[ValidateSet("Init", "Build", "Rebuild", "Clean")]
|
[ValidateSet("Init", "Build", "Rebuild", "Clean", "Package", "PackageTmp")]
|
||||||
[string]$Task
|
[string]$Task
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -145,6 +145,7 @@ function Rebuild
|
|||||||
{
|
{
|
||||||
CallMsbuild "Rebuild"
|
CallMsbuild "Rebuild"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Clean
|
function Clean
|
||||||
{
|
{
|
||||||
CallMsbuild "Clean"
|
CallMsbuild "Clean"
|
||||||
@ -166,12 +167,81 @@ function Clean
|
|||||||
Remove-Item -Path "xmplay/Release" -Recurse -ErrorAction Ignore
|
Remove-Item -Path "xmplay/Release" -Recurse -ErrorAction Ignore
|
||||||
Remove-Item -Path "Debug" -Recurse -ErrorAction Ignore
|
Remove-Item -Path "Debug" -Recurse -ErrorAction Ignore
|
||||||
Remove-Item -Path "Release" -Recurse -ErrorAction Ignore
|
Remove-Item -Path "Release" -Recurse -ErrorAction Ignore
|
||||||
|
Remove-Item -Path "bin" -Recurse -ErrorAction Ignore
|
||||||
|
Remove-Item -Path "tmp" -Recurse -ErrorAction Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fb2kFiles = @(
|
||||||
|
"ext_libs/*.dll",
|
||||||
|
"ext_libs/libspeex/*.dll",
|
||||||
|
"Release/foo_input_vgmstream.dll",
|
||||||
|
"README.md"
|
||||||
|
)
|
||||||
|
|
||||||
|
$cliFiles = @(
|
||||||
|
"ext_libs/*.dll",
|
||||||
|
"ext_libs/libspeex/*.dll",
|
||||||
|
"Release/in_vgmstream.dll",
|
||||||
|
"Release/test.exe",
|
||||||
|
"Release/xmp-vgmstream.dll",
|
||||||
|
"COPYING",
|
||||||
|
"README.md"
|
||||||
|
)
|
||||||
|
|
||||||
|
$fb2kPdbFiles = @(
|
||||||
|
"Release/foo_input_vgmstream.pdb"
|
||||||
|
)
|
||||||
|
|
||||||
|
$cliPdbFiles = @(
|
||||||
|
"Release/in_vgmstream.pdb",
|
||||||
|
"Release/test.pdb",
|
||||||
|
"Release/xmp-vgmstream.pdb"
|
||||||
|
)
|
||||||
|
|
||||||
|
function Package
|
||||||
|
{
|
||||||
|
if(!(Test-Path "Release/test.exe")) { Build }
|
||||||
|
|
||||||
|
if(!(Test-Path "Release/test.exe")) {
|
||||||
|
Write-Error "Unable to find binaries, check for compilation errors"
|
||||||
|
}
|
||||||
|
|
||||||
|
Compress-Archive $cliFiles Release/vgmstream-win.zip -Force
|
||||||
|
Compress-Archive $fb2kFiles Release/foo_input_vgmstream.zip -Force
|
||||||
|
Compress-Archive $cliPdbFiles Release/vgmstream-win.pdb.zip -Force
|
||||||
|
Compress-Archive $fb2kPdbFiles Release/foo_input_vgmstream.pdb.zip -Force
|
||||||
|
|
||||||
|
md -Force bin
|
||||||
|
Move-Item Release/vgmstream-win.zip bin/vgmstream-win.zip -Force
|
||||||
|
Move-Item Release/foo_input_vgmstream.zip bin/foo_input_vgmstream.fb2k-component -Force
|
||||||
|
Move-Item Release/vgmstream-win.pdb.zip bin/vgmstream-win.pdb.zip -Force
|
||||||
|
Move-Item Release/foo_input_vgmstream.pdb.zip bin/foo_input_vgmstream.pdb.zip -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# for github actions/artifact uploads, that use a dir with files
|
||||||
|
function PackageTmp
|
||||||
|
{
|
||||||
|
Package
|
||||||
|
|
||||||
|
md -Force tmp/cli
|
||||||
|
md -Force tmp/fb2k
|
||||||
|
md -Force tmp/cli-p
|
||||||
|
md -Force tmp/fb2k-p
|
||||||
|
|
||||||
|
Copy-Item $cliFiles tmp/cli/ -Recurse -Force
|
||||||
|
Copy-Item $fb2kFiles tmp/fb2k/ -Recurse -Force
|
||||||
|
Copy-Item $cliPdbFiles tmp/cli-p/ -Recurse -Force
|
||||||
|
Copy-Item $fb2kPdbFiles tmp/fb2k-p/ -Recurse -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
switch ($Task)
|
switch ($Task)
|
||||||
{
|
{
|
||||||
"Init" { Init }
|
"Init" { Init }
|
||||||
"Build" { Build }
|
"Build" { Build }
|
||||||
"Rebuild" { Rebuild }
|
"Rebuild" { Rebuild }
|
||||||
"Clean" { Clean }
|
"Clean" { Clean }
|
||||||
|
"Package" { Package }
|
||||||
|
"PackageTmp" { PackageTmp }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user