Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0.0 #23

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ about: Create a bug report to improve aptdec
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour.
Steps to reproduce the behavior.

**Expected behaviour**
A clear description of what you expected to happen.

**Link to audio**
A link to the audio that caused the problem.
A link to the audio file that caused the problem (if applicable).

**Build information**
The commit of aptdec you are running (check with `git rev-parse HEAD`), make sure it's up to date before opening this issue.
And whether you are using GNU automake or CMake.
The version of aptdec you are running (check with `git describe --tag`), make sure it's up to date before opening this issue.
105 changes: 67 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ on:
paths-ignore:
- '**.md'

env:
BUILD_TYPE: Release

jobs:
build_linux:
runs-on: ubuntu-latest
Expand All @@ -21,37 +18,28 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0

- name: Install dependencies
# The user does not run as root
run: sudo apt-get install cmake git gcc libsndfile-dev libpng-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 compilied binary
uses: actions/upload-artifact@v2
- name: Configure cmake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release

- name: Build and package
run: cmake --build build -j$(nproc) && cmake --build build --target package

- name: Upload TGZ archive
uses: actions/upload-artifact@v3
with:
name: aptdec_lin64
path: ${{runner.workspace}}/build/aptdec
name: TGZ archive (x86_64-gcc)
path: build/aptdec_*.tar.gz

- name: Upload Debian package
uses: actions/upload-artifact@v3
with:
name: Debian package (x86_64-gcc)
path: build/aptdec_*.deb

build_windows:
runs-on: ubuntu-latest
Expand All @@ -60,18 +48,59 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0

- name: Install dependencies
# The user does not run as root
run: sudo apt install wget cmake make mingw-w64 git unzip libsndfile-dev
run: sudo apt install cmake git mingw-w64 unzip

- name: Run build script
run: ./build_windows.sh $BUILD_TYPE

- name: Upload ZIP archive
uses: actions/upload-artifact@v3
with:
name: ZIP archive (x86_64-MinGW)
path: winbuild/aptdec_*.zip

build_windows_msvc:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0

- name: Run build script
shell: bash
working-directory: ${{runner.workspace}}
run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE
shell: cmd
run: '"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" & build_windows.bat'

- name: Upload ZIP archive
uses: actions/upload-artifact@v3
with:
name: ZIP archive (x86_64-MSVC)
path: winbuild/aptdec_*.zip

build_linux_armhf:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0

- name: Run build script
run: docker run -v $(pwd):/aptdec:z -w /aptdec debian:11 ./build_arm.sh

- name: Upload Debian package
uses: actions/upload-artifact@v3
with:
name: Debian package (armhf-gcc)
path: build/aptdec_*.deb

- name: Upload compilied binary
uses: actions/upload-artifact@v2
- name: Upload TGZ archive
uses: actions/upload-artifact@v3
with:
name: aptdec-win64.zip
path: ${{runner.workspace}}/aptdec/winbuild/aptdec-1.7.0.zip
name: TGZ archive (armhf-gcc)
path: build/aptdec_*.tar.gz
113 changes: 46 additions & 67 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,110 +1,89 @@
name: Build
name: Build (release)

on:
push:
tags:
- 'v*'

env:
BUILD_TYPE: Release

jobs:
prepare_release:
create_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
needs: [ build_linux, build_windows ]

steps:
- name: Download TGZ package
uses: actions/download-artifact@v3
with:
name: TGZ package

- name: Download DEB package
uses: actions/download-artifact@v3
with:
name: DEB package

- name: Download ZIP package
uses: actions/download-artifact@v3
with:
name: ZIP package

- name: Test
run: ls -la

- name: Create Release
uses: actions/create-release@v1
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: A release wow
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
files: |
aptdec_$GITHUB_REF_NAME.x86_64.tar.gz
aptdec_$GITHUB_REF_NAME.x86_64.deb
aptdec_$GITHUB_REF_NAME.amd64.zip

build_linux:
runs-on: ubuntu-latest
needs: [prepare_release]

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

fetch-depth: 0

- name: Install dependencies
# The user does not run as root
run: sudo apt-get install cmake git gcc libsndfile-dev libpng-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 && cmake --build . --target package
- name: Configure cmake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release

- name: Build and package
run: cmake --build build -j$(nproc) && cmake --build build --target package

- name: Upload TGZ package
uses: actions/upload-release-asset@v1
uses: actions/upload-artifact@v3
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ${{runner.workspace}}/build/aptdec-${{ github.ref_name }}.x86_64.tar.gz
asset_name: aptdec-${{ github.ref_name }}.x86_64.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ github.token }}
name: TGZ package
path: build/aptdec_*.tar.gz

- name: Upload DEB package
uses: actions/upload-release-asset@v1
uses: actions/upload-artifact@v3
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ${{runner.workspace}}/build/aptdec-${{ github.ref_name }}.x86_64.deb
asset_name: aptdec-${{ github.ref_name }}.x86_64.deb
asset_content_type: application/vnd.debian.binary-package
env:
GITHUB_TOKEN: ${{ github.token }}
name: Debian package
path: build/aptdec_*.deb

build_windows:
runs-on: ubuntu-latest
needs: [prepare_release]

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0

- name: Install dependencies
# The user does not run as root
run: sudo apt install wget cmake make mingw-w64 git unzip libsndfile-dev
run: sudo apt install cmake git mingw-w64 unzip

- name: Run build script
shell: bash
working-directory: ${{runner.workspace}}
run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE
run: ./build_windows.sh $BUILD_TYPE

- name: Upload zip
uses: actions/upload-release-asset@v1
- name: Upload ZIP package
uses: actions/upload-artifact@v3
with:
upload_url: ${{ needs.prepare_release.outputs.upload_url }}
asset_path: ${{runner.workspace}}/aptdec/winbuild/aptdec-${{ github.ref_name }}.zip
asset_name: aptdec-${{ github.ref_name }}.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ github.token }}
name: ZIP package
path: winbuild/aptdec_*.zip
54 changes: 44 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Created by https://www.gitignore.io/api/c
# Edit at https://www.gitignore.io/?templates=c
# Created by https://www.toptal.com/developers/gitignore/api/c,cmake
# Edit at https://www.toptal.com/developers/gitignore?templates=c,cmake

### C ###
# Prerequisites
*.d

# Object files
*.o
Expand All @@ -26,33 +30,63 @@
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Program specifics
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps

### CMake Patch ###
# External projects
*-prefix/

# End of https://www.toptal.com/developers/gitignore/api/c,cmake

*.png
!textlogo.png
!palettes/*.png
!luts/*.png
!util/*.png

*.wav
aptdec
*.ogg

.vscode/
build/
libpng/
zlib/
winbuild/
winpath/
libsndfile-1.0.29-win64.zip
libsndfile-1.0.29-win64/
zlib/
libpng/
libsndfile-*-win64.zip
libsndfile-*-win64/
root/
Loading