update .github actions to finally run macos and linux

depth-refraction
Bret Curtis 2 years ago
parent 05c224d26a
commit 9a02e35927

@ -1,6 +1,9 @@
name: CMake name: CMake
on: on:
push:
branches:
- 'master'
pull_request: pull_request:
branches: [ master ] branches: [ master ]
@ -12,76 +15,94 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Add OpenMW PPA Dependancies - name: Add OpenMW PPA Dependencies
run: sudo add-apt-repository ppa:openmw/openmw; sudo apt-get update run: sudo add-apt-repository ppa:openmw/openmw; sudo apt-get update
- name: Install Building Dependancies - name: Install Building Dependencies
run: sudo CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic run: sudo CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
- name: Prime ccache - name: Prime ccache
uses: hendrikmuhs/ccache-action@v1 uses: hendrikmuhs/ccache-action@v1
with: with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }} key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M max-size: 1000M
- name: Install gtest - name: Configure
run: | run: cmake . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DOPENMW_USE_SYSTEM_RECASTNAVIGATION=1 -DUSE_SYSTEM_TINYXML=1 -DBUILD_UNITTESTS=1 -DCMAKE_INSTALL_PREFIX=install
export CONFIGURATION="Release"
export GOOGLETEST_DIR="." - name: Build
export GENERATOR="Unix Makefiles" run: make -j3
export CC="gcc"
export CXX="g++" - name: Test
sudo -E CI/build_googletest.sh run: ./openmw_test_suite
- name: Configure # - name: Install
run: cmake -S . -B . -DGTEST_ROOT="$(pwd)/googletest/build" -DGMOCK_ROOT="$(pwd)/googletest/build" -DBUILD_UNITTESTS=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS='-Werror' -DCMAKE_CXX_FLAGS="-Werror -Wno-error=deprecated-declarations -Wno-error=nonnull -Wno-error=deprecated-copy" # shell: bash
# run: cmake --install .
- name: Build
run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel 3 # - name: Create Artifact
# shell: bash
- name: Test # working-directory: install
run: ./openmw_test_suite # run: |
# ls -laR
# - name: Install # 7z a ../build_artifact.7z .
# shell: bash
# run: cmake --install . # - name: Upload Artifact
# uses: actions/upload-artifact@v1
# - name: Create Artifact # with:
# shell: bash # path: ./build_artifact.7z
# working-directory: install # name: build_artifact.7z
# run: |
# ls -laR
# 7z a ../build_artifact.7z .
# - name: Upload Artifact
# uses: actions/upload-artifact@v1
# with:
# path: ./build_artifact.7z
# name: build_artifact.7z
MacOS: MacOS:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Building Dependancies - name: Install Building Dependencies
run: CI/before_install.osx.sh run: CI/before_install.osx.sh
- name: Prime ccache - name: Prime ccache
uses: hendrikmuhs/ccache-action@v1 uses: hendrikmuhs/ccache-action@v1
with: with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }} key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M max-size: 1000M
- name: Configure - name: Configure
run: | run: |
rm -fr build # remove the build directory rm -fr build # remove the build directory
CI/before_script.osx.sh CI/before_script.osx.sh
- name: Build
- name: Build run: |
run: | cd build
cd build make -j $(sysctl -n hw.logicalcpu) package
make -j $(sysctl -n hw.logicalcpu) package Windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Building Dependencies
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
choco source disable -n=chocolatey
choco install git --force --params "/GitAndUnixToolsOnPath" -y
choco install 7zip -y
choco install ccache -y
choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
choco install vswhere -y
choco install ninja -y
refreshenv
- name: Build
run: |
$env:CCACHE_BASEDIR = Get-Location
$env:CCACHE_DIR = "$(Get-Location)\ccache"
New-Item -Type Directory -Force -Path $env:CCACHE_DIR
sh CI/before_script.msvc.sh -c $env:BUILD_TYPE -p Win64 -v 2019 -k -V -N -b -t -C -E
cd MSVC2019_64_Ninja
.\ActivateMSVC.ps1
cmake --build . --config $env:BUILD_TYPE
ccache --show-stats
Loading…
Cancel
Save