CI: Restyle and added missing compressed archives creation
This commit is contained in:
parent
6c6436ced7
commit
9d59e18472
1 changed files with 299 additions and 232 deletions
531
.github/workflows/build.yml
vendored
531
.github/workflows/build.yml
vendored
|
|
@ -1,5 +1,4 @@
|
||||||
name: build
|
name: Build library
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|
@ -10,176 +9,166 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- '*'
|
||||||
|
# Manual builds in all branches
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
build_type: Release
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang_tidy:
|
clang_tidy:
|
||||||
|
# if: ${{ false }}
|
||||||
|
name: Clang Tidy
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Set up dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: sudo apt-get update && sudo apt-get install clang-tidy
|
||||||
sudo apt-get update && \
|
- name: Run
|
||||||
sudo apt-get install \
|
|
||||||
clang-tidy \
|
|
||||||
libsndfile1-dev
|
|
||||||
- name: Clang Tidy
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
run: cd "$GITHUB_WORKSPACE" && scripts/run_clang_tidy.sh
|
run: cd "$GITHUB_WORKSPACE" && scripts/run_clang_tidy.sh
|
||||||
|
|
||||||
build_for_linux:
|
build_for_linux:
|
||||||
|
# if: ${{ false }}
|
||||||
|
name: Linux Ubuntu 20.04
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
env:
|
||||||
|
install_name: sfizz-${{ github.ref_name }}-linux
|
||||||
steps:
|
steps:
|
||||||
- name: Set install name
|
- name: Checkout
|
||||||
run: |
|
uses: actions/checkout@v3
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
echo "install_name=sfizz-${GITHUB_REF##*/}-linux" >> "$GITHUB_ENV"
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Set up dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && \
|
sudo apt-get update && sudo apt-get install \
|
||||||
sudo apt-get install \
|
|
||||||
ninja-build \
|
ninja-build \
|
||||||
libjack-jackd2-dev
|
libjack-jackd2-dev
|
||||||
- name: Create Build Environment
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
run: cmake -E make_directory build
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: |
|
run: |
|
||||||
cmake "$GITHUB_WORKSPACE" -G Ninja \
|
options=(
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
-G Ninja
|
||||||
-DSFIZZ_JACK=ON \
|
-B build
|
||||||
-DSFIZZ_TESTS=ON \
|
-S "$GITHUB_WORKSPACE"
|
||||||
-DSFIZZ_SHARED=OFF \
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=OFF \
|
-D CMAKE_CXX_STANDARD=17
|
||||||
-DCMAKE_CXX_STANDARD=17
|
-D SFIZZ_JACK=ON
|
||||||
|
-D SFIZZ_RENDER=ON
|
||||||
|
-D SFIZZ_SHARED=ON
|
||||||
|
-D SFIZZ_TESTS=ON
|
||||||
|
)
|
||||||
|
cmake "${options[@]}"
|
||||||
- name: Build tests
|
- name: Build tests
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: cmake --build . --config "$BUILD_TYPE" -j 2 --target sfizz_tests
|
run: |
|
||||||
|
cmake \
|
||||||
|
--build build \
|
||||||
|
--config ${{ env.build_type }} \
|
||||||
|
--target sfizz_tests \
|
||||||
|
--verbose \
|
||||||
|
-j 2
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ${{runner.workspace}}/build/tests/sfizz_tests
|
run: ${{ runner.workspace }}/build/tests/sfizz_tests
|
||||||
# Reenable with newer cmakes
|
- name: CTest
|
||||||
# working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}/build
|
||||||
# run: ctest -j 2 -C "$BUILD_TYPE" --output-on-failure
|
run: ctest -j 2 -C ${{ env.build_type }} --output-on-failure
|
||||||
- name: Build all
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
run: cmake --build . --config "$BUILD_TYPE" -j 2
|
|
||||||
- name: Install
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
DESTDIR="$(pwd)/$install_name" cmake --build . --config "$BUILD_TYPE" --target install
|
|
||||||
tar czvf "$install_name".tar.gz "$install_name"
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: Linux tarball
|
|
||||||
path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
|
||||||
|
|
||||||
build_with_libsndfile:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Set install name
|
|
||||||
run: |
|
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
echo "install_name=sfizz-${GITHUB_REF##*/}-linux" >> "$GITHUB_ENV"
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Set up dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update && \
|
|
||||||
sudo apt-get install \
|
|
||||||
ninja-build \
|
|
||||||
libsndfile1-dev
|
|
||||||
- name: Create Build Environment
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
run: cmake -E make_directory build
|
|
||||||
- name: Configure CMake
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
run: |
|
|
||||||
cmake "$GITHUB_WORKSPACE" -G Ninja \
|
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
|
||||||
-DSFIZZ_JACK=OFF \
|
|
||||||
-DSFIZZ_USE_SNDFILE=ON \
|
|
||||||
-DSFIZZ_TESTS=ON \
|
|
||||||
-DSFIZZ_SHARED=OFF \
|
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=OFF
|
|
||||||
- name: Build tests
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
run: cmake --build . --config "$BUILD_TYPE" -j 2 --target sfizz_tests
|
|
||||||
- name: Run tests
|
|
||||||
shell: bash
|
|
||||||
run: ${{runner.workspace}}/build/tests/sfizz_tests
|
|
||||||
|
|
||||||
build_for_macos:
|
|
||||||
runs-on: macos-11
|
|
||||||
steps:
|
|
||||||
- name: Set install name
|
|
||||||
run: |
|
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
echo "install_name=sfizz-${GITHUB_REF##*/}-macos" >> "$GITHUB_ENV"
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Create Build Environment
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
run: cmake -E make_directory build
|
|
||||||
- name: Configure CMake
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
run: |
|
|
||||||
cmake "$GITHUB_WORKSPACE" \
|
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
|
||||||
-DSFIZZ_JACK=OFF \
|
|
||||||
-DSFIZZ_TESTS=ON \
|
|
||||||
-DSFIZZ_SHARED=OFF \
|
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=OFF
|
|
||||||
- name: Build tests
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
run: |
|
|
||||||
cmake --build . --config "$BUILD_TYPE" -j 2 --target sfizz_tests
|
|
||||||
- name: Run tests
|
|
||||||
shell: bash
|
|
||||||
run: ${{runner.workspace}}/build/tests/sfizz_tests
|
|
||||||
# Reenable with newer cmakes
|
|
||||||
# working-directory: ${{runner.workspace}}/build
|
|
||||||
# run: ctest -j 2 -C "$BUILD_TYPE" --output-on-failure
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: cmake --build . --config "$BUILD_TYPE" -j 2
|
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
|
||||||
- name: Install
|
- name: Create tarball
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
|
||||||
run: |
|
run: |
|
||||||
DESTDIR="$(pwd)/$install_name" cmake --build . --config "$BUILD_TYPE" --target install
|
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||||
tar czvf "$install_name".tar.gz "$install_name"
|
cmake --build build --config ${{ env.build_type }} --target install
|
||||||
- uses: actions/upload-artifact@v3
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||||
|
- name: Upload
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Linux tarball
|
||||||
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
||||||
|
|
||||||
|
build_for_macos:
|
||||||
|
# if: ${{ false }}
|
||||||
|
name: macOS 11
|
||||||
|
runs-on: macos-11
|
||||||
|
env:
|
||||||
|
install_name: "sfizz-${{ github.ref_name }}-macos"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Install dependencies
|
||||||
|
if: ${{ github.ref_type == 'branch' }}
|
||||||
|
run: brew install abseil
|
||||||
|
- name: Configure CMake
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: |
|
||||||
|
options=(
|
||||||
|
-B build
|
||||||
|
-S "$GITHUB_WORKSPACE"
|
||||||
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
||||||
|
-D SFIZZ_JACK=OFF
|
||||||
|
-D SFIZZ_SHARED=ON
|
||||||
|
-D SFIZZ_TESTS=ON
|
||||||
|
)
|
||||||
|
if [[ ${{ github.ref_type }} == 'branch' ]]; then
|
||||||
|
options=(
|
||||||
|
${options[@]}
|
||||||
|
-D SFIZZ_USE_SYSTEM_ABSEIL=ON
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
cmake "${options[@]}"
|
||||||
|
- name: Build tests
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: |
|
||||||
|
cmake \
|
||||||
|
--build build \
|
||||||
|
--config ${{ env.build_type }} \
|
||||||
|
--target sfizz_tests \
|
||||||
|
--verbose \
|
||||||
|
-j 2
|
||||||
|
- name: Run tests
|
||||||
|
shell: bash
|
||||||
|
run: ${{ runner.workspace }}/build/tests/sfizz_tests
|
||||||
|
- name: CTest
|
||||||
|
working-directory: ${{ runner.workspace }}/build
|
||||||
|
run: ctest -j 2 -C ${{ env.build_type }} --output-on-failure
|
||||||
|
- name: Build
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
|
||||||
|
- name: Create tarball
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: |
|
||||||
|
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||||
|
cmake --build build --config ${{ env.build_type }} --target install
|
||||||
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||||
|
- name: Upload
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macOS tarball
|
name: macOS tarball
|
||||||
path: |
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
||||||
${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
|
||||||
|
|
||||||
# build_for_mod: MOVED in plugins repository
|
|
||||||
|
|
||||||
build_for_windows:
|
build_for_windows:
|
||||||
|
# if: ${{ false }}
|
||||||
|
name: Windows 2019
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -192,32 +181,80 @@ jobs:
|
||||||
pkg_platform: Win64
|
pkg_platform: Win64
|
||||||
release_arch: x64
|
release_arch: x64
|
||||||
bits: 64
|
bits: 64
|
||||||
|
env:
|
||||||
|
install_name: sfizz-${{ github.ref_name }}-win${{ matrix.bits }}
|
||||||
steps:
|
steps:
|
||||||
- name: Set install name
|
- name: Checkout
|
||||||
run: |
|
uses: actions/checkout@v3
|
||||||
echo "install_ref=$(${Env:GITHUB_REF}.split('/')[-1])" >> "${Env:GITHUB_ENV}"
|
|
||||||
echo "install_name=sfizz-$(${Env:GITHUB_REF}.split('/')[-1])-win${{matrix.bits}}" >> "${Env:GITHUB_ENV}"
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Create Build Environment
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
run: cmake -E make_directory build
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: |
|
run: |
|
||||||
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${{matrix.release_arch}}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DCMAKE_CXX_STANDARD=17 -DSFIZZ_TESTS=ON
|
cmake `
|
||||||
|
-G "Visual Studio 16 2019" `
|
||||||
|
-A "${{ matrix.release_arch }}" `
|
||||||
|
-B build `
|
||||||
|
-S "${Env:GITHUB_WORKSPACE}" `
|
||||||
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }} `
|
||||||
|
-D CMAKE_CXX_STANDARD=17 `
|
||||||
|
-D SFIZZ_TESTS=ON `
|
||||||
- name: Build tests
|
- name: Build tests
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2 --target sfizz_tests
|
run: |
|
||||||
|
cmake `
|
||||||
|
--build build `
|
||||||
|
--config ${{ env.build_type }} `
|
||||||
|
--target sfizz_tests `
|
||||||
|
--verbose `
|
||||||
|
-j 2 `
|
||||||
- name: Test
|
- name: Test
|
||||||
run: ${{runner.workspace}}/build/tests/Release/sfizz_tests
|
run: ${{ runner.workspace }}\build\tests\${{ env.build_type }}\sfizz_tests.exe
|
||||||
- name: Build all
|
- name: Build
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
|
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
|
||||||
|
- name: Create zip package
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: 7z a "${{ env.install_name }}.zip" ".\build\src\${{ env.build_type }}\sfizz.*"
|
||||||
|
- name: Upload
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.pkg_platform }} zip package
|
||||||
|
path: "${{ runner.workspace }}/${{ env.install_name }}.zip"
|
||||||
|
|
||||||
|
archive_source_code:
|
||||||
|
# if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
name: Source code archive
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
env:
|
||||||
|
install_name: sfizz-${{ github.ref_name }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && sudo apt-get install python3-pip
|
||||||
|
sudo pip install git-archive-all
|
||||||
|
- name: Archive source code
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "$GITHUB_WORKSPACE" && git-archive-all \
|
||||||
|
--prefix="${{ env.install_name }}/" \
|
||||||
|
-9 "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Source code tarball
|
||||||
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
||||||
|
|
||||||
build_for_mingw:
|
build_for_mingw:
|
||||||
if: ${{ false }} # DISABLED TEMPORARILY
|
if: ${{ false }} # DISABLED TEMPORARILY
|
||||||
|
name: MinGW
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -230,11 +267,9 @@ jobs:
|
||||||
bits: 64
|
bits: 64
|
||||||
container:
|
container:
|
||||||
image: archlinux
|
image: archlinux
|
||||||
|
env:
|
||||||
|
install_name: sfizz-${{ github.ref_name }}-mingw${{ matrix.bits }}
|
||||||
steps:
|
steps:
|
||||||
- name: Set install name
|
|
||||||
run: |
|
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
echo "install_name=sfizz-${GITHUB_REF##*/}-mingw${{matrix.bits}}" >> "$GITHUB_ENV"
|
|
||||||
- name: Configure pacman repositories
|
- name: Configure pacman repositories
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -243,13 +278,17 @@ jobs:
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
[mingw-w64]
|
[mingw-w64]
|
||||||
SigLevel = Optional TrustAll
|
SigLevel = Optional TrustAll
|
||||||
Server = https://github.com/sfztools/arch-mingw-w64/releases/download/repo.\$arch/
|
Server = https://github.com/jpcima/arch-mingw-w64/releases/download/repo.\$arch/
|
||||||
EOF
|
EOF
|
||||||
- name: Set up dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
packages=(
|
||||||
|
base-devel git ninja wget
|
||||||
|
mingw-w64-{cmake,gcc,pkg-config,libsndfile}
|
||||||
|
)
|
||||||
pacman -Sqyu --noconfirm
|
pacman -Sqyu --noconfirm
|
||||||
pacman -Sq --needed --noconfirm base-devel git wget ninja mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
pacman -Sq --needed --noconfirm "${packages[@]}"
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
@ -257,40 +296,88 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
||||||
/usr/${{matrix.platform}}-w64-mingw32/include/dwrite_3.h
|
/usr/${{ matrix.platform }}-w64-mingw32/include/dwrite_3.h
|
||||||
- name: Create Build Environment
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{runner.workspace}}
|
|
||||||
run: cmake -E make_directory build
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: |
|
run: |
|
||||||
${{matrix.platform}}-w64-mingw32-cmake "$GITHUB_WORKSPACE" -G Ninja \
|
options=(
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
-G Ninja
|
||||||
-DENABLE_LTO=OFF \
|
-B build
|
||||||
-DSFIZZ_JACK=OFF \
|
-S "$GITHUB_WORKSPACE"
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
||||||
-DCMAKE_CXX_STANDARD=17
|
-D CMAKE_CXX_STANDARD=17
|
||||||
|
-D ENABLE_LTO=OFF
|
||||||
|
-D SFIZZ_STATIC_DEPENDENCIES=ON
|
||||||
|
-D SFIZZ_JACK=OFF
|
||||||
|
)
|
||||||
|
${{ matrix.platform }}-w64-mingw32-cmake "${options[@]}"
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
working-directory: ${{ runner.workspace }}
|
||||||
run: ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" -j 2
|
run: ${{ matrix.platform }}-w64-mingw32-cmake \
|
||||||
|
--build build --config ${{ env.build_type }} --verbose -j 2
|
||||||
- name: Install
|
- name: Install
|
||||||
working-directory: ${{runner.workspace}}/build
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
DESTDIR="$(pwd)/$install_name" ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" --target install
|
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
||||||
tar czvf "$install_name".tar.gz "$install_name"
|
${{ matrix.platform }}-w64-mingw32-cmake \
|
||||||
- uses: actions/upload-artifact@v3
|
--build build --config ${{ env.build_type }} --target install
|
||||||
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
||||||
|
- name: Upload
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.pkg_platform}} MinGW tarball
|
name: ${{ matrix.pkg_platform }} MinGW tarball
|
||||||
path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
||||||
|
|
||||||
build_with_makefile:
|
build_with_libsndfile:
|
||||||
|
# if: ${{ false }}
|
||||||
|
name: Linux libsndfile
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && sudo apt-get install \
|
||||||
|
ninja-build \
|
||||||
|
libsndfile1-dev
|
||||||
|
- name: Configure CMake
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: |
|
||||||
|
options=(
|
||||||
|
-G Ninja
|
||||||
|
-B build
|
||||||
|
-S "$GITHUB_WORKSPACE"
|
||||||
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
||||||
|
-D SFIZZ_JACK=OFF
|
||||||
|
-D SFIZZ_RENDER=OFF
|
||||||
|
-D SFIZZ_SHARED=OFF
|
||||||
|
-D SFIZZ_TESTS=ON
|
||||||
|
-D SFIZZ_USE_SNDFILE=ON
|
||||||
|
)
|
||||||
|
cmake "${options[@]}"
|
||||||
|
- name: Build tests
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ runner.workspace }}
|
||||||
|
run: cmake --build build -j 2 --target sfizz_tests
|
||||||
|
- name: Run tests
|
||||||
|
shell: bash
|
||||||
|
run: ${{ runner.workspace }}/build/tests/sfizz_tests
|
||||||
|
|
||||||
|
build_with_makefile:
|
||||||
|
# if: ${{ false }}
|
||||||
|
name: Linux makefile
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build with GNU make
|
- name: Build with GNU make
|
||||||
|
|
@ -317,82 +404,62 @@ jobs:
|
||||||
EOF
|
EOF
|
||||||
make -C "$GITHUB_WORKSPACE" -f simple.mk
|
make -C "$GITHUB_WORKSPACE" -f simple.mk
|
||||||
|
|
||||||
archive_source_code:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
steps:
|
|
||||||
- name: Set install name
|
|
||||||
run: |
|
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
echo "install_name=sfizz-${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Set up dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update && \
|
|
||||||
sudo apt-get install \
|
|
||||||
python3-pip
|
|
||||||
sudo pip install git-archive-all
|
|
||||||
- name: Archive source code
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd "$GITHUB_WORKSPACE" && \
|
|
||||||
git-archive-all --prefix="${install_name}/" -9 "${{runner.workspace}}/${install_name}.tar.gz"
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: Source code tarball
|
|
||||||
path: ${{runner.workspace}}/${{env.install_name}}.tar.gz
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
needs:
|
needs:
|
||||||
- build_for_linux
|
- build_for_linux
|
||||||
# - build_for_mingw
|
# - build_for_mingw
|
||||||
# - build_for_windows
|
- build_for_macos
|
||||||
|
# - build_for_mod
|
||||||
|
- build_for_windows
|
||||||
- archive_source_code
|
- archive_source_code
|
||||||
steps:
|
steps:
|
||||||
- name: Set install name
|
- name: macOS download
|
||||||
run: |
|
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
||||||
- if: ${{ false }} # DISABLED: Use distro packages
|
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
|
||||||
name: Linux tarball
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: macOS tarball
|
name: macOS tarball
|
||||||
- if: ${{ false }} # DISABLED: MinGW 32 build temporarily disabled
|
|
||||||
|
- name: MinGW 32 download
|
||||||
|
if: ${{ false }} # DISABLED: MinGW 32 build temporarily disabled
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Win32 MinGW tarball
|
name: Win32 MinGW tarball
|
||||||
- if: ${{ false }} # DISABLED: MinGW 64 build temporarily disabled
|
|
||||||
|
- name: MinGW 64 download
|
||||||
|
if: ${{ false }} # DISABLED: MinGW 64 build temporarily disabled
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Win64 MinGW tarball
|
name: Win64 MinGW tarball
|
||||||
- if: ${{ false }} # DISABLED: Innosetup 32 in plugins repo
|
|
||||||
|
- name: Windows 32 download
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Win32 installer
|
name: Win32 zip package
|
||||||
- if: ${{ false }} # DISABLED: Innosetup 64 in plugins repo
|
|
||||||
|
- name: Windows 64 download
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Win64 installer
|
name: Win64 zip package
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
|
- name: Source code download
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Source code tarball
|
name: Source code tarball
|
||||||
|
|
||||||
- name: Display file information
|
- name: Display file information
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ls -lR
|
run: ls -lR
|
||||||
- uses: softprops/action-gh-release@v1
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{env.install_ref}}
|
tag_name: ${{ github.ref_name }}
|
||||||
name: Release ${{env.install_ref}}
|
name: Release ${{ github.ref_name }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: |
|
files: |
|
||||||
sfizz-${{env.install_ref}}-*
|
sfizz-${{ github.ref_name }}-*
|
||||||
sfizz-${{env.install_ref}}.*
|
sfizz-${{ github.ref_name }}.*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue