build: tweaks

This commit is contained in:
bnnm 2021-08-27 22:21:04 +02:00
parent c8b2a63920
commit 7502e89ff4
3 changed files with 38 additions and 35 deletions

View File

@ -1,3 +1,5 @@
# github workflow to automate builds
name: Linux build name: Linux build
on: [push, pull_request] on: [push, pull_request]
@ -18,17 +20,17 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Fetch Git Tags - name: Fetch Git tags
run: | run: |
git fetch --prune --unshallow --tags git fetch --prune --unshallow --tags
- name: Install Dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libmpg123-dev libvorbis-dev libavformat-dev libavcodec-dev libavutil-dev libswresample-dev sudo apt-get install -y libmpg123-dev libvorbis-dev libavformat-dev libavcodec-dev libavutil-dev libswresample-dev
sudo apt-get install -y libao-dev audacious-dev libjansson-dev sudo apt-get install -y libao-dev audacious-dev libjansson-dev
- name: Create Build Environment - name: Create build environment
# Some projects don't allow in-source building, so create a separate build directory # Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands # We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build run: cmake -E make_directory ${{runner.workspace}}/build
@ -48,34 +50,35 @@ jobs:
shell: bash shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>" # Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE run: cmake --build . --config $BUILD_TYPE
- name: Upload CLI Tools Artifact
uses: actions/upload-artifact@v2
with:
path: |
${{runner.workspace}}/build/cli/vgmstream_cli
${{runner.workspace}}/build/cli/vgmstream123
name: vgmstream_cli
- name: Upload Audacious Plugin Artifact
uses: actions/upload-artifact@v2
with:
path: ${{runner.workspace}}/build/audacious/vgmstream.so
name: vgmstream-audacious
- name: Upload Artifacts to S3 # not useful since sharing artifacts between Linux distros ain't fun
if: github.event_name != 'pull_request' #- name: Upload CLI tools artifact
working-directory: ${{runner.workspace}}/build # uses: actions/upload-artifact@v2
shell: bash # with:
env: # path: |
AWS_DEFAULT_REGION: us-west-1 # ${{runner.workspace}}/build/cli/vgmstream-cli
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} # ${{runner.workspace}}/build/cli/vgmstream123
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} # name: vgmstream-cli
run: |
cd cli #- name: Upload Audacious plugin artifact
tar cvfz vgmstream-cli.tar.gz vgmstream_cli vgmstream123 # uses: actions/upload-artifact@v2
cd ../audacious # with:
tar cvfz vgmstream-audacious.tar.gz vgmstream.so # path: ${{runner.workspace}}/build/audacious/vgmstream.so
cd .. # name: vgmstream-audacious
aws s3 cp cli/vgmstream-cli.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-cli.tar.gz --acl public-read
aws s3 cp audacious/vgmstream-audacious.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-audacious.tar.gz --acl public-read #- name: Upload artifacts to S3
# if: github.event_name != 'pull_request'
# working-directory: ${{runner.workspace}}/build
# shell: bash
# env:
# AWS_DEFAULT_REGION: us-west-1
# AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
# AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
# run: |
# cd cli
# tar cvfz vgmstream-cli.tar.gz vgmstream-cli vgmstream123
# cd ../audacious
# tar cvfz vgmstream-audacious.tar.gz vgmstream.so
# cd ..
# aws s3 cp cli/vgmstream-cli.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-cli.tar.gz --acl public-read
# aws s3 cp audacious/vgmstream-audacious.tar.gz s3://vgmstream-builds/${{github.sha}}/linux/vgmstream-audacious.tar.gz --acl public-read

View File

@ -1,4 +1,4 @@
# This is a basic workflow to help you get started with Actions # github workflow to automate builds
name: Windows build name: Windows build

View File

@ -200,7 +200,7 @@ $cliPdbFiles = @(
function Package function Package
{ {
if(!(Test-Path "Release/test.exe")) { Build } Build
if(!(Test-Path "Release/test.exe")) { if(!(Test-Path "Release/test.exe")) {
Write-Error "Unable to find binaries, check for compilation errors" Write-Error "Unable to find binaries, check for compilation errors"