ci: migrate to GitHub Actions
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds
* scripts: cleanup of old CI scripts
* scripts: now port to GitHub Actions
* actions: fix extras checkout
* github: remove codeql action, turned out not to be very useful
* github: remove quiet flag on wget
* github: are we allowed to use envvars?
* github: add needed dependencies for linux
* github: install wget for windows
* scripts: convert our CPU architecture naming into what AppImage uses
* github: run scripts with bash explicitly
* github: first try to upload to GitHub Releases, enable amd64 win32 builds
* Use our uploadtool fork
* ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts
* gha: try to fix build
* travis: try to fix build
* gha: try to fix upload, fix win32 build
* gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build
* gha: add llvm repository, install clang-12 for android
* gha: motomagx: fail fast
* gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip
* waifulib: xcompile: respect environment variables when using host compiler for Android
* waifulib: xcompile: use correct environ dict
* gha: try to fix -fuse-ld=lld with clang-12
* waifulib: xcompile: fix typo
* scripts: xcompile: fix motomagx build
* mainui: upgrade
* gha: fix android build, last time
* engine: wscript: disable crashhandler for magx
4 years ago
|
|
|
name: Build & Deploy Engine
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
continue-on-error: true
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
targetos: linux
|
|
|
|
targetarch: amd64
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
targetos: linux
|
|
|
|
targetarch: i386
|
|
|
|
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
targetos: android
|
|
|
|
targetarch: 32
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
targetos: android
|
|
|
|
targetarch: 64
|
|
|
|
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
targetos: motomagx
|
|
|
|
targetarch: armv6
|
|
|
|
|
|
|
|
- os: windows-latest
|
|
|
|
targetos: win32
|
|
|
|
targetarch: amd64
|
|
|
|
- os: windows-latest
|
|
|
|
targetos: win32
|
|
|
|
targetarch: i386
|
|
|
|
env:
|
|
|
|
SDL_VERSION: 2.0.14
|
|
|
|
GH_CPU_ARCH: ${{ matrix.targetarch }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
ANDROID_SDK_TOOLS_VER: 4333796
|
|
|
|
ANDROID_NDK_VER: r10e
|
|
|
|
UPLOADTOOL_ISPRERELEASE: true
|
|
|
|
PVS_URL: https://files.pvs-studio.com/pvs-studio-7.14.50353.142-x86_64.tgz
|
|
|
|
PVS_VERSION: pvs-studio-7.14.50353.142-x86_64
|
ci: migrate to GitHub Actions
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds
* scripts: cleanup of old CI scripts
* scripts: now port to GitHub Actions
* actions: fix extras checkout
* github: remove codeql action, turned out not to be very useful
* github: remove quiet flag on wget
* github: are we allowed to use envvars?
* github: add needed dependencies for linux
* github: install wget for windows
* scripts: convert our CPU architecture naming into what AppImage uses
* github: run scripts with bash explicitly
* github: first try to upload to GitHub Releases, enable amd64 win32 builds
* Use our uploadtool fork
* ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts
* gha: try to fix build
* travis: try to fix build
* gha: try to fix upload, fix win32 build
* gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build
* gha: add llvm repository, install clang-12 for android
* gha: motomagx: fail fast
* gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip
* waifulib: xcompile: respect environment variables when using host compiler for Android
* waifulib: xcompile: use correct environ dict
* gha: try to fix -fuse-ld=lld with clang-12
* waifulib: xcompile: fix typo
* scripts: xcompile: fix motomagx build
* mainui: upgrade
* gha: fix android build, last time
* engine: wscript: disable crashhandler for magx
4 years ago
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Checkout xash-extras
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: FWGS/xash-extras
|
|
|
|
path: xash-extras
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
|
|
|
|
|
|
|
|
- name: Build engine
|
|
|
|
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
|
|
|
|
|
|
|
|
- name: Upload engine (android)
|
|
|
|
if: matrix.targetos == 'android'
|
|
|
|
run: bash scripts/continious_upload.sh xashdroid-${{ matrix.targetarch }}.apk
|
|
|
|
- name: Upload engine (motomagx)
|
|
|
|
if: matrix.targetos == 'motomagx'
|
|
|
|
run: bash scripts/continious_upload.sh xash3d-fwgs-magx.7z
|
|
|
|
- name: Upload engine (linux)
|
|
|
|
if: matrix.targetos == 'linux'
|
|
|
|
run: bash scripts/continious_upload.sh xash3d-fwgs-${{ matrix.targetarch }}.AppImage xashds-linux-${{ matrix.targetarch }}
|
|
|
|
- name: Upload engine (windows)
|
|
|
|
if: matrix.targetos == 'win32'
|
|
|
|
run: bash scripts/continious_upload.sh xash3d-fwgs-win32-${{ matrix.targetarch }}.7z xash3d-fwgs-vc2008-sln-${{ matrix.targetarch }}.7z
|
|
|
|
|
|
|
|
- name: Cache PVS-Studio
|
|
|
|
if: matrix.targetos == 'linux' && matrix.targetarch == 'amd64'
|
|
|
|
id: cache-pvs-studio
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: pvs-studio.tgz
|
|
|
|
key: pvs-studio-key
|
|
|
|
- name: Get PVS-Studio
|
|
|
|
if: matrix.targetos == 'linux' && matrix.targetarch == 'amd64' && steps.cache-pvs-studio.outputs.cache-hit != 'true'
|
|
|
|
run: wget --no-verbose ${{ env.PVS_URL }} -O pvs-studio.tgz
|
|
|
|
|
|
|
|
- name: Static analysis
|
|
|
|
if: matrix.targetos == 'linux' && matrix.targetarch == 'amd64'
|
|
|
|
run: |
|
|
|
|
tar -xvf pvs-studio.tgz && mv ${{ env.PVS_VERSION }} pvs-studio
|
|
|
|
mkdir -p ~/.config/PVS-Studio
|
|
|
|
echo ${{ secrets.PVS_NAME }} > ~/.config/PVS-Studio/PVS-Studio.lic
|
|
|
|
echo ${{ secrets.PVS_KEY }} >> ~/.config/PVS-Studio/PVS-Studio.lic
|
|
|
|
pvs-studio/bin/pvs-studio-analyzer analyze --file build/compile_commands.json -j3
|
|
|
|
pvs-studio/bin/plog-converter -a GA:1,2 -t sarif -o report.sarif PVS-Studio.log
|
|
|
|
- name: Upload SARIF
|
|
|
|
if: matrix.targetos == 'linux' && matrix.targetarch == 'amd64'
|
|
|
|
uses: github/codeql-action/upload-sarif@v1
|
|
|
|
with:
|
|
|
|
sarif_file: report.sarif
|