1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-24 17:00:54 +00:00
openmw/.github/workflows/push.yml
2026-01-02 12:55:51 +03:00

139 lines
3.5 KiB
YAML

name: Build and test
on:
- workflow_dispatch
env:
BUILD_TYPE: RelWithDebInfo
jobs:
Ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Add OpenMW PPA Dependencies
run: sudo add-apt-repository ppa:openmw/openmw; sudo apt-get update
- name: Install Building Dependencies
run: sudo CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M
- name: Configure
run: >
cmake .
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D OPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
-D USE_SYSTEM_TINYXML=ON
-D BUILD_COMPONENTS_TESTS=ON
-D BUILD_OPENMW_TESTS=ON
-D BUILD_OPENCS_TESTS=ON
-D CMAKE_INSTALL_PREFIX=.
- name: Build
run: cmake --build . -- -j$(nproc)
- name: Run components tests
run: ./components-tests
- name: Run OpenMW tests
run: ./openmw-tests
- name: Run OpenMW-CS tests
run: ./openmw-cs-tests
- name: Prepare portable package
shell: bash
run: |
mkdir -p openmw-linux
cp -r resources openmw-linux/
cp defaults.bin openmw-linux/
cp gamecontrollerdb.txt openmw-linux/
cp openmw.cfg openmw-linux/
cp openmw openmw-linux/
cp openmw-launcher openmw-linux/
cp openmw-cs openmw-linux/
cp openmw-wizard openmw-linux/
cp openmw-iniimporter openmw-linux/
cp openmw-essimporter openmw-linux/
cp bsatool openmw-linux/
cp esmtool openmw-linux/
cp openmw-navmeshtool openmw-linux/ || true
cp openmw-bulletobjecttool openmw-linux/ || true
cp README.md openmw-linux/
cp LICENSE openmw-linux/
cp AUTHORS.md openmw-linux/
cp CHANGELOG.md openmw-linux/
- name: Create Artifact
shell: bash
run: tar -czf openmw-linux-${{ github.sha }}.tar.gz openmw-linux
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: ./openmw-linux-${{ github.sha }}.tar.gz
name: openmw-linux-build
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Building Dependencies
run: CI/before_install.macos.sh
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M
- name: Configure
run: CI/before_script.macos.sh -C
- name: Build
run: CI/macos/build.sh
- name: Package
working-directory: build
run: make -j $(sysctl -n hw.logicalcpu) package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: build/*.dmg
name: openmw-macos-build
Output-Envs:
name: Read .env file and expose it as output
runs-on: ubuntu-latest
outputs:
VCPKG_DEPS_TAG: ${{ env.VCPKG_DEPS_TAG }}
BUILD_TYPE: ${{ env.BUILD_TYPE }}
steps:
- uses: actions/checkout@v4
- run: cat "${{ github.workspace }}/CI/github.env" >> $GITHUB_ENV
Windows:
needs:
- Output-Envs
strategy:
fail-fast: true
matrix:
image:
- "2022"
uses: ./.github/workflows/windows.yml
with:
image: ${{ matrix.image }}
vcpkg-deps-tag: ${{ needs.Output-Envs.outputs.VCPKG_DEPS_TAG }}
build-type: ${{ needs.Output-Envs.outputs.BUILD_TYPE }}