mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 01:27:20 +01:00
82 lines
3.2 KiB
YAML
82 lines
3.2 KiB
YAML
name: Linux build
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build:
|
|
# The CMake configure and build commands are platform agnostic and should work equally
|
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
# cross-platform coverage.
|
|
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
|
|
name: CMake, Ubuntu
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Fetch Git Tags
|
|
run: |
|
|
git fetch --prune --unshallow --tags
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
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 libao-dev audacious-dev libjansson-dev
|
|
|
|
- name: Create Build Environment
|
|
# 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
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
- name: Configure CMake
|
|
# Use a bash shell so we can use the same syntax for environment variable
|
|
# access regardless of the host operating system
|
|
shell: bash
|
|
working-directory: ${{runner.workspace}}/build
|
|
# Note the current convention is to use the -S and -B options here to specify source
|
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
|
|
|
- name: Build
|
|
working-directory: ${{runner.workspace}}/build
|
|
shell: bash
|
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
|
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
|
|
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
|