Merge pull request #738 from jpcima/actions-with-msvc
Migration of MSVC builds to Actions
This commit is contained in:
commit
6e8afb0ea0
7 changed files with 80 additions and 78 deletions
|
|
@ -7,18 +7,6 @@ environment:
|
|||
appveyor_build_worker_image: macos
|
||||
INSTALL_DIR: sfizz-$(APPVEYOR_REPO_TAG_NAME)-macos
|
||||
|
||||
- job_name: Windows x86
|
||||
appveyor_build_worker_image: Visual Studio 2019
|
||||
platform: x86
|
||||
VCPKG_TRIPLET: x86-windows-static
|
||||
PATH: C:\Program Files (x86)\Inno Setup 6;%PATH%
|
||||
|
||||
- job_name: Windows x64
|
||||
appveyor_build_worker_image: Visual Studio 2019
|
||||
platform: x64
|
||||
VCPKG_TRIPLET: x64-windows-static
|
||||
PATH: C:\Program Files (x86)\Inno Setup 6;%PATH%
|
||||
|
||||
# Made with https://github.com/sfztools/code-signing
|
||||
CODESIGN_IDENTITY: codesign.sfz.tools
|
||||
CODESIGN_P12:
|
||||
|
|
@ -54,35 +42,11 @@ for:
|
|||
- name: macOS DMG
|
||||
path: "sfizz-*.dmg"
|
||||
|
||||
- matrix:
|
||||
only:
|
||||
- job_name: Windows x86
|
||||
cache: c:\tools\vcpkg\installed\ -> appveyor.yml
|
||||
install: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\install.cmd
|
||||
before_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\before_build.cmd
|
||||
build_script: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\build.cmd
|
||||
after_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\after_build.cmd
|
||||
artifacts:
|
||||
- name: x86 Setup
|
||||
path: "sfizz-*.exe"
|
||||
|
||||
- matrix:
|
||||
only:
|
||||
- job_name: Windows x64
|
||||
cache: c:\tools\vcpkg\installed\ -> appveyor.yml
|
||||
install: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\install.cmd
|
||||
before_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\before_build.cmd
|
||||
build_script: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\build.cmd
|
||||
after_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\after_build.cmd
|
||||
artifacts:
|
||||
- name: x64 Setup
|
||||
path: "sfizz-*.exe"
|
||||
|
||||
deploy:
|
||||
- provider: GitHub
|
||||
auth_token:
|
||||
secure: xOugGAynvnZdc0DXaL3rlgMf4CICFLkdO8JxoRfLQMKJhkj/kZ4d8h7NCFneDzXG
|
||||
artifact: macOS DMG,x86 Setup,x64 Setup
|
||||
artifact: macOS DMG
|
||||
draft: false
|
||||
prerelease: false
|
||||
force_update: true
|
||||
|
|
|
|||
64
.github/workflows/build.yml
vendored
64
.github/workflows/build.yml
vendored
|
|
@ -133,6 +133,70 @@ jobs:
|
|||
name: MOD devices tarball
|
||||
path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
||||
|
||||
build_for_win32:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Set install name
|
||||
run: |
|
||||
echo platform=x86 >> "${Env:GITHUB_ENV}"
|
||||
echo release_arch=Win32 >> "${Env:GITHUB_ENV}"
|
||||
echo "install_ref=$(${Env:GITHUB_REF}.split('/')[-1])" >> "${Env:GITHUB_ENV}"
|
||||
echo "install_name=sfizz-$(${Env:GITHUB_REF}.split('/')[-1])-win32" >> "${Env:GITHUB_ENV}"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Create Build Environment
|
||||
working-directory: ${{runner.workspace}}
|
||||
run: cmake -E make_directory build
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: |
|
||||
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DCMAKE_CXX_STANDARD=17 -DSFIZZ_TESTS=ON -DSFIZZ_VST=ON -DSFIZZ_LV2=ON
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
|
||||
- name: Test
|
||||
run: ${{runner.workspace}}/build/tests/Release/sfizz_tests
|
||||
- name: Create installer
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: iscc /O"." /F"${Env:install_name}" /dARCH="${Env:platform}" innosetup.iss
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Win32 installer
|
||||
path: ${{runner.workspace}}/build/${{env.install_name}}.exe
|
||||
|
||||
build_for_win64:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Set install name
|
||||
run: |
|
||||
echo platform=x64 >> "${Env:GITHUB_ENV}"
|
||||
echo release_arch=x64 >> "${Env:GITHUB_ENV}"
|
||||
echo "install_ref=$(${Env:GITHUB_REF}.split('/')[-1])" >> "${Env:GITHUB_ENV}"
|
||||
echo "install_name=sfizz-$(${Env:GITHUB_REF}.split('/')[-1])-win64" >> "${Env:GITHUB_ENV}"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Create Build Environment
|
||||
working-directory: ${{runner.workspace}}
|
||||
run: cmake -E make_directory build
|
||||
- name: Configure CMake
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: |
|
||||
cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DCMAKE_CXX_STANDARD=17 -DSFIZZ_TESTS=ON -DSFIZZ_VST=ON -DSFIZZ_LV2=ON
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
|
||||
- name: Test
|
||||
run: ${{runner.workspace}}/build/tests/Release/sfizz_tests
|
||||
- name: Create installer
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: iscc /O"." /F"${Env:install_name}" /dARCH="${Env:platform}" innosetup.iss
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Win64 installer
|
||||
path: ${{runner.workspace}}/build/${{env.install_name}}.exe
|
||||
|
||||
build_for_mingw32:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
@echo off
|
||||
|
||||
iscc.exe /dARCH=%platform% innosetup.iss
|
||||
move *.exe ../
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
git submodule update --init --recursive
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
if %platform%==x86 set RELEASE_ARCH=Win32
|
||||
if %platform%==x64 set RELEASE_ARCH=x64
|
||||
|
||||
cmake .. -G"Visual Studio 16 2019" -A"%RELEASE_ARCH%"^
|
||||
-DSFIZZ_BENCHMARKS=OFF^
|
||||
-DSFIZZ_TESTS=ON^
|
||||
-DSFIZZ_LV2=ON^
|
||||
-DSFIZZ_VST=ON^
|
||||
-DCMAKE_BUILD_TYPE=Release^
|
||||
-DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET%^
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
cmake --build . --target sfizz_tests --config Release -j2
|
||||
.\tests\Release\sfizz_tests.exe
|
||||
cmake --build . --target sfizz_lv2 --config Release -j2
|
||||
cmake --build . --target sfizz_lv2_ui --config Release -j2
|
||||
cmake --build . --target sfizz_vst3 --config Release -j2
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
choco install -y innosetup
|
||||
|
||||
REM Uncomment the next 4 lines to force vcpkg update
|
||||
REM cd c:\tools\vcpkg\
|
||||
REM git pull
|
||||
REM .\bootstrap-vcpkg.bat
|
||||
REM cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
REM vcpkg install libsndfile:%VCPKG_TRIPLET%
|
||||
|
|
@ -156,8 +156,12 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
auto tempSize = newSize + 2 * AlignmentMask; // To ensure that we have leeway at the beginning and at the end
|
||||
auto* newData = std::realloc(paddedData.get(), tempSize * sizeof(value_type));
|
||||
Type* oldData = paddedData.get();
|
||||
Type* oldNormalData = normalData;
|
||||
std::size_t oldSize = alignedSize;
|
||||
|
||||
std::size_t tempSize = newSize + 2 * AlignmentMask; // To ensure that we have leeway at the beginning and at the end
|
||||
Type* newData = reinterpret_cast<Type*>(std::calloc(tempSize, sizeof(value_type)));
|
||||
if (newData == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -173,12 +177,15 @@ public:
|
|||
paddedData.reset(static_cast<pointer>(newData));
|
||||
normalData = static_cast<pointer>(align(Alignment, alignedSize, newData, tempSize));
|
||||
normalEnd = normalData + alignedSize;
|
||||
auto endMisalignment = (alignedSize & TypeAlignmentMask);
|
||||
std::size_t endMisalignment = (alignedSize & TypeAlignmentMask);
|
||||
if (endMisalignment != 0)
|
||||
_alignedEnd = normalEnd + Alignment - endMisalignment;
|
||||
else
|
||||
_alignedEnd = normalEnd;
|
||||
|
||||
std::memcpy(normalData, oldNormalData, std::min(newSize, oldSize) * sizeof(Type));
|
||||
std::free(oldData);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -307,14 +314,14 @@ private:
|
|||
static_assert(Alignment == 0 || Alignment == 4 || Alignment == 8 || Alignment == 16 || Alignment == 32, "Bad alignment value");
|
||||
static_assert(TypeAlignment * sizeof(value_type) == Alignment || !std::is_arithmetic<value_type>::value,
|
||||
"The alignment does not appear to be divided by the size of the arithmetic Type");
|
||||
void* align(std::size_t alignment, std::size_t size, void *&ptr, std::size_t &space )
|
||||
void* align(std::size_t alignment, std::size_t size, void *ptr, std::size_t &space)
|
||||
{
|
||||
std::uintptr_t pn = reinterpret_cast< std::uintptr_t>( ptr );
|
||||
std::uintptr_t aligned = ( pn + alignment - 1 ) & - alignment;
|
||||
std::uintptr_t pn = reinterpret_cast<std::uintptr_t>(ptr);
|
||||
std::uintptr_t aligned = (pn + alignment - 1) & - alignment;
|
||||
std::size_t padding = aligned - pn;
|
||||
if ( space < size + padding ) return nullptr;
|
||||
if (space < size + padding) return nullptr;
|
||||
space -= padding;
|
||||
return ptr = reinterpret_cast< void * >( aligned );
|
||||
return reinterpret_cast<void *>(aligned);
|
||||
}
|
||||
|
||||
struct deleter {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue