Archive GitHub actions build artifacts

This commit is contained in:
Luke Street 2021-03-07 15:42:48 -05:00
parent 55dd197e67
commit e8eda2656a
2 changed files with 105 additions and 17 deletions

View File

@ -14,25 +14,38 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install build-essential curl git cmake ninja-build llvm-dev libclang-dev clang lld \
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev python3 python-is-python3 qt5-default
- name: Create build directory
shell: bash
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DURDE_VECTOR_ISA=sse41
run: |
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 \
-DURDE_DLPACKAGE=urde-$GITHUB_RUN_NUMBER-linux-gcc-x86_64
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Generate AppImage
env:
VERSION: ${{github.run_number}}
run: ci/build-appimage.sh
- uses: actions/upload-artifact@v2
with:
name: urde-linux-gcc-x86_64
path: URDE-*.AppImage
build-linux-clang:
name: Build Linux (Clang x86_64)
runs-on: ubuntu-20.04
@ -40,25 +53,39 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install build-essential curl git cmake ninja-build llvm-dev libclang-dev clang lld \
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev python3 python-is-python3 qt5-default
- name: Create build directory
shell: bash
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DURDE_VECTOR_ISA=sse41 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
run: |
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DURDE_DLPACKAGE=urde-$GITHUB_RUN_NUMBER-linux-clang-x86_64
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Generate AppImage
env:
VERSION: ${{github.run_number}}
run: ci/build-appimage.sh
- uses: actions/upload-artifact@v2
with:
name: urde-linux-clang-x86_64
path: URDE-*.AppImage
build-macos:
name: Build macOS (Clang x86_64)
runs-on: macos-10.15
@ -66,51 +93,75 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
shell: bash
run: brew install ninja qt
- name: Create build directory
shell: bash
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DURDE_VECTOR_ISA=sse41
run: cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- uses: actions/upload-artifact@v2
with:
name: urde-macos-x86_64
path: build/Binaries/urde.app
build-windows-msvc:
name: Build Windows (MSVC x86_64)
runs-on: [self-hosted, windows, x64]
runs-on: [ self-hosted, windows, x64 ]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# - name: Download LLVM
# uses: suisei-cn/actions-download-file@v1
# id: download-llvm
# with:
# url: https://axiodl.com/files/LLVM-10.0.1-win64.exe
# target: ${{github.workspace}}/temp
# - name: Install LLVM
# shell: cmd
# working-directory: ${{github.workspace}}/temp
# run: ${{steps.download-llvm.outputs.filename}} /S
# - name: Install ninja
# run: choco install ninja
- name: Enable Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
- name: Create build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake .. -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DURDE_VECTOR_ISA=sse41 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS=
run: |
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= `
-DURDE_DLPACKAGE=urde-$env:GITHUB_RUN_NUMBER-win32-msvc-x86_64
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- uses: actions/upload-artifact@v2
with:
name: urde-windows-msvc-x86_64
path: |
build/Binaries/urde.exe
build/Binaries/hecl.exe
build/Binaries/hecl-gui.exe
build/Binaries/visigen.exe
build-windows-clang:
name: Build Windows (Clang x86_64)
runs-on: windows-2019
@ -118,25 +169,47 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Download LLVM
uses: suisei-cn/actions-download-file@v1
id: download-llvm
with:
url: https://axiodl.com/files/LLVM-10.0.1-win64.exe
target: ${{github.workspace}}/temp
- name: Install LLVM
shell: cmd
working-directory: ${{github.workspace}}/temp
run: ${{steps.download-llvm.outputs.filename}} /S
- name: Install ninja
run: choco install ninja
- name: Enable Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
- name: Create build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake .. -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DURDE_VECTOR_ISA=sse41 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe"
run: |
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DURDE_VECTOR_ISA=sse41 `
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
-DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" `
-DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" `
-DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" `
-DURDE_DLPACKAGE=urde-$env:GITHUB_RUN_NUMBER-win32-clang-x86_64
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- uses: actions/upload-artifact@v2
with:
name: urde-windows-clang-x86_64
path: |
build/Binaries/urde.exe
build/Binaries/hecl.exe
build/Binaries/hecl-gui.exe
build/Binaries/visigen.exe

15
ci/build-appimage.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash -ex
# Get linuxdeploy
curl -OL https://github.com/encounter/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage
curl -OL https://github.com/encounter/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$(uname -m).AppImage
chmod +x linuxdeploy-$(uname -m).AppImage linuxdeploy-plugin-qt-$(uname -m).AppImage
# Build AppImage
mkdir -p appdir/usr/{bin,share/{applications,icons/hicolor}}
cp build/Binaries/{hecl,hecl-gui,urde,visigen} appdir/usr/bin
strip -s appdir/usr/bin/{hecl,hecl-gui,urde,visigen}
cp -r Editor/platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} appdir/usr/share/icons/hicolor
cp Editor/platforms/freedesktop/urde.desktop appdir/usr/share/applications
sed -i 's/Exec=.*/Exec=hecl-gui/' appdir/usr/share/applications/urde.desktop
./linuxdeploy-$(uname -m).AppImage --appdir appdir --plugin qt --output appimage