linux gha fix

# Conflicts:
#	.github/workflows/pr_build.yml
This commit is contained in:
Thijs Wenker 2020-04-22 20:46:07 +02:00
parent c4a0fc30bb
commit f186c9341a

View file

@ -29,8 +29,12 @@ jobs:
build:
strategy:
matrix:
os: [windows-latest, macOS-latest]
os: [windows-latest, macOS-latest, ubuntu-18.04]
build_type: [full]
include:
- os: ubuntu-18.04
build_type: full
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0
fail-fast: false
runs-on: ${{matrix.os}}
if: github.event.action != 'labeled' || github.event.label.name == 'rebuild'
@ -41,10 +45,12 @@ jobs:
run: |
echo ::set-env name=GIT_COMMIT_SHORT::`echo $GIT_COMMIT | cut -c1-7`
echo ::set-env name=JOB_NAME::"build (${{matrix.os}}, ${{matrix.build_type}})"
# Linux build variables
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
if [[ "${{ matrix.os }}" = "ubuntu-"* ]]; then
echo ::set-env name=PYTHON_EXEC::python3
echo ::set-env name=INSTALLER_EXT::tgz
echo ::set-env name=CMAKE_BUILD_EXTRA::"-- -j3"
fi
# Mac build variables
if [ "${{ matrix.os }}" = "macOS-latest" ]; then
@ -63,11 +69,11 @@ jobs:
shell: bash
run: |
echo "${{ steps.buildenv1.outputs.symbols_archive }}"
echo ::set-env name=ARTIFACT_PATTERN::HighFidelity-Beta-*.$INSTALLER_EXT
echo ::set-env name=ARTIFACT_PATTERN::ProjectAthena-Alpha-PR${{ github.event.number }}-*.$INSTALLER_EXT
# Build type variables
echo ::set-env name=INSTALLER::HighFidelity-Beta-$RELEASE_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT
- name: Clear Working Directory
if: matrix.os[1] == 'windows'
if: startsWith(matrix.os, 'windows')
shell: bash
working-directory: ${{runner.workspace}}
run: rm -rf ./*
@ -75,6 +81,18 @@ jobs:
with:
submodules: true
fetch-depth: 1
- name: Install dependencies
shell: bash
if: startsWith(matrix.os, 'ubuntu')
run: |
echo "Installing Python Modules:"
pip3 install distro || exit 1
echo "Updating apt repository index"
sudo apt update || exit 1
echo "Installing apt packages"
sudo apt install -y ${{ matrix.apt-dependencies }} || exit 1
- name: Create Build Environment
shell: bash
run: cmake -E make_directory "${{runner.workspace}}/build"
@ -85,23 +103,23 @@ jobs:
- name: Build Application
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME $CMAKE_BUILD_EXTRA
- name: Build Domain Server
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target domain-server
run: cmake --build . --config $BUILD_TYPE --target domain-server $CMAKE_BUILD_EXTRA
- name: Build Assignment Client
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target assignment-client
run: cmake --build . --config $BUILD_TYPE --target assignment-client $CMAKE_BUILD_EXTRA
- name: Build Console
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console $CMAKE_BUILD_EXTRA
- name: Build Installer
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target package
run: cmake --build . --config $BUILD_TYPE --target package $CMAKE_BUILD_EXTRA
- name: Output Installer Logs
if: failure() && matrix.os == 'windows-latest'
shell: bash
@ -112,33 +130,4 @@ jobs:
working-directory: ${{runner.workspace}}/build
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
ARTIFACT_PATTERN: ProjectAthena-Alpha-PR${{ github.event.number }}-*.exe
run: python "$GITHUB_WORKSPACE\tools\ci-scripts\upload_to_publish_server.py"
build_full_linux:
runs-on: ubuntu-16.04
env:
JOB_NAME: build_full_linux
if: github.event.action != 'labeled' || github.event.label.name == 'rebuild'
steps:
- uses: actions/checkout@v1
with:
submodules: true
fetch-depth: 1
- name: Update apt repository index
run: sudo apt update
- name: Install apt packages
run: sudo apt install -y mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 python3-setuptools
- name: Install python modules
shell: bash
run: pip3 install boto3 distro PyGithub
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release -DBUILD_TOOLS:BOOLEAN=FALSE
- name:
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . -- -j3