mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 14:33:01 +00:00
Merge CI phases
This commit is contained in:
parent
3fbcc6be57
commit
5474f6899f
1 changed files with 40 additions and 113 deletions
153
.github/workflows/build.yml
vendored
153
.github/workflows/build.yml
vendored
|
@ -14,7 +14,6 @@ env:
|
|||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
# Do a plain build, like we would expect a user to do it on their end.
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -27,7 +26,7 @@ jobs:
|
|||
- { name: 'Ubuntu', os: ubuntu-18.04 }
|
||||
fail-fast: false
|
||||
|
||||
name: "Build: ${{ matrix.config.name }}"
|
||||
name: "Test: ${{ matrix.config.name }}"
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
steps:
|
||||
|
@ -62,6 +61,34 @@ jobs:
|
|||
echo "::set-output name=msvc-target::${msvc_target}"
|
||||
echo "::set-output name=mingw-target::${mingw_target}"
|
||||
|
||||
- name: Set package identifier
|
||||
id: package-identify
|
||||
run: |
|
||||
package_name="furnace-${GITHUB_SHA}"
|
||||
package_ext=""
|
||||
if [ '${{ runner.os }}' == 'Windows' ] || [ '${{ matrix.config.compiler }}' == 'mingw' ]; then
|
||||
package_name="${package_name}-Windows"
|
||||
if [ '${{ matrix.config.compiler }}' == 'mingw' ]; then
|
||||
package_name="${package_name}-MinGW"
|
||||
else
|
||||
package_name="${package_name}-MSVC"
|
||||
fi
|
||||
package_name="${package_name}-${{ matrix.config.arch }}"
|
||||
package_ext="" # Directory, uploading will automatically zip it
|
||||
elif [ '${{ runner.os }}' == 'macOS' ]; then
|
||||
package_name="${package_name}-macOS"
|
||||
package_ext=".dmg"
|
||||
else
|
||||
package_name="${package_name}-Linux"
|
||||
package_ext=".AppImage"
|
||||
fi
|
||||
|
||||
echo "Package identifier: ${package_name}"
|
||||
echo "Package file: ${package_name}${package_ext}"
|
||||
|
||||
echo "::set-output name=id::${package_name}"
|
||||
echo "::set-output name=filename::${package_name}${package_ext}"
|
||||
|
||||
- name: Setup Toolchain [Windows MSVC]
|
||||
if: ${{ matrix.config.compiler == 'msvc' }}
|
||||
uses: seanmiddleditch/gha-setup-vsdevenv@v3
|
||||
|
@ -100,9 +127,12 @@ jobs:
|
|||
librtmidi-dev \
|
||||
libsndfile1-dev \
|
||||
zlib1g-dev \
|
||||
libjack-jackd2-dev
|
||||
libjack-jackd2-dev \
|
||||
appstream
|
||||
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
chmod +x appimagetool-x86_64.AppImage
|
||||
|
||||
- name: Configure
|
||||
- name: Configure (Normal)
|
||||
run: |
|
||||
export USE_WAE=ON
|
||||
export CMAKE_EXTRA_ARGS=()
|
||||
|
@ -135,7 +165,7 @@ jobs:
|
|||
-DWARNINGS_ARE_ERRORS=${USE_WAE} \
|
||||
"${CMAKE_EXTRA_ARGS[@]}"
|
||||
|
||||
- name: Build
|
||||
- name: Build (Normal)
|
||||
run: |
|
||||
export VERBOSE=1
|
||||
cmake \
|
||||
|
@ -143,120 +173,17 @@ jobs:
|
|||
--config ${{ env.BUILD_TYPE }} \
|
||||
--parallel 2
|
||||
|
||||
- name: Install
|
||||
- name: Install (Normal)
|
||||
run: |
|
||||
cmake \
|
||||
--install ${PWD}/build \
|
||||
--config ${{ env.BUILD_TYPE }}
|
||||
|
||||
# Now do a build that we can package. (static runtime linking on MSVC, zipping on Windows, CPack on Darwin, appimage stuff on Ubuntu)
|
||||
# We rebuild here because the build dependencies may be slightly different and might trigger a full rebuild anyway.
|
||||
package:
|
||||
needs: build
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { name: 'Windows MSVC x86', os: windows-latest, compiler: msvc, arch: x86 }
|
||||
- { name: 'Windows MSVC x86_64', os: windows-latest, compiler: msvc, arch: x86_64 }
|
||||
- { name: 'Windows MinGW x86', os: ubuntu-20.04, compiler: mingw, arch: x86 }
|
||||
- { name: 'Windows MinGW x86_64', os: ubuntu-20.04, compiler: mingw, arch: x86_64 }
|
||||
- { name: 'macOS', os: macos-latest }
|
||||
- { name: 'Ubuntu', os: ubuntu-18.04 }
|
||||
fail-fast: false
|
||||
|
||||
name: "Package: ${{ matrix.config.name }}"
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Windows arch identifiers
|
||||
id: windows-identify
|
||||
if: ${{ matrix.config.compiler == 'msvc' || matrix.config.compiler == 'mingw' }}
|
||||
- name: Cleanup (Normal)
|
||||
run: |
|
||||
vswhere_target="${{ matrix.config.arch }}"
|
||||
msvc_target="${{ matrix.config.arch }}"
|
||||
mingw_target="${{ matrix.config.arch }}"
|
||||
rm -rf build/ target/
|
||||
|
||||
if [ '${{ matrix.config.arch }}' == 'x86' ]; then
|
||||
msvc_target="Win32"
|
||||
elif [ '${{ matrix.config.arch }}' == 'x86_64' ]; then
|
||||
vswhere_target="amd64"
|
||||
msvc_target="x64"
|
||||
fi
|
||||
|
||||
if [ '${{ matrix.config.compiler }}' == 'msvc' ]; then
|
||||
echo "vswhere target: ${vswhere_target}"
|
||||
echo "MSVC target: ${msvc_target}"
|
||||
else
|
||||
echo "MinGW cross target: ${mingw_target}"
|
||||
fi
|
||||
|
||||
echo "::set-output name=vswhere-target::${vswhere_target}"
|
||||
echo "::set-output name=msvc-target::${msvc_target}"
|
||||
echo "::set-output name=mingw-target::${mingw_target}"
|
||||
|
||||
- name: Setup Toolchain [Windows MSVC]
|
||||
if: ${{ matrix.config.compiler == 'msvc' }}
|
||||
uses: seanmiddleditch/gha-setup-vsdevenv@v3
|
||||
with:
|
||||
arch: ${{ steps.windows-identify.outputs.vswhere-target }}
|
||||
|
||||
- name: Setup Toolchain [Windows MinGW]
|
||||
if: ${{ matrix.config.compiler == 'mingw' }}
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install \
|
||||
mingw-w64 \
|
||||
mingw-w64-tools
|
||||
|
||||
- name: Install Dependencies [Ubuntu]
|
||||
if: ${{ runner.os == 'Linux' && matrix.config.compiler != 'mingw' }}
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install \
|
||||
libsdl2-dev \
|
||||
libfmt-dev \
|
||||
librtmidi-dev \
|
||||
libsndfile1-dev \
|
||||
zlib1g-dev \
|
||||
libjack-jackd2-dev \
|
||||
appstream
|
||||
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
chmod +x appimagetool-x86_64.AppImage
|
||||
|
||||
- name: Set package identifier
|
||||
id: package-identify
|
||||
run: |
|
||||
package_name="furnace-${GITHUB_SHA}"
|
||||
package_ext=""
|
||||
if [ '${{ runner.os }}' == 'Windows' ] || [ '${{ matrix.config.compiler }}' == 'mingw' ]; then
|
||||
package_name="${package_name}-Windows"
|
||||
if [ '${{ matrix.config.compiler }}' == 'mingw' ]; then
|
||||
package_name="${package_name}-MinGW"
|
||||
else
|
||||
package_name="${package_name}-MSVC"
|
||||
fi
|
||||
package_name="${package_name}-${{ matrix.config.arch }}"
|
||||
package_ext="" # Directory, uploading will automatically zip it
|
||||
elif [ '${{ runner.os }}' == 'macOS' ]; then
|
||||
package_name="${package_name}-macOS"
|
||||
package_ext=".dmg"
|
||||
else
|
||||
package_name="${package_name}-Linux"
|
||||
package_ext=".AppImage"
|
||||
fi
|
||||
|
||||
echo "Package identifier: ${package_name}"
|
||||
echo "Package file: ${package_name}${package_ext}"
|
||||
|
||||
echo "::set-output name=id::${package_name}"
|
||||
echo "::set-output name=filename::${package_name}${package_ext}"
|
||||
|
||||
- name: Configure
|
||||
- name: Configure (Package)
|
||||
run: |
|
||||
export USE_WAE=ON
|
||||
export CMAKE_EXTRA_ARGS=()
|
||||
|
@ -288,7 +215,7 @@ jobs:
|
|||
-DWARNINGS_ARE_ERRORS=${USE_WAE} \
|
||||
"${CMAKE_EXTRA_ARGS[@]}"
|
||||
|
||||
- name: Build
|
||||
- name: Build (Package)
|
||||
run: |
|
||||
export VERBOSE=1
|
||||
cmake \
|
||||
|
|
Loading…
Reference in a new issue