Skip to content

[brief] Update the README with the latest versions. #5

[brief] Update the README with the latest versions.

[brief] Update the README with the latest versions. #5

Workflow file for this run

name: Release
on:
push:
tags:
- "*.*.*"
workflow_dispatch:
permissions:
contents: write
jobs:
format:
uses: ./.github/workflows/clang-format.yml
build:
name: ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
needs: format
strategy:
fail-fast: false
matrix:
config:
- {os: "windows-latest", cxx: "msvc", cc: "msvc", preset: "msvc"}
- {os: "ubuntu-24.04", cxx: "g++-14", cc: "gcc-14", preset: "gcc"}
steps:
- name: Chekout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
id: setup_python
with:
python-version: "3.12"
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ~/deps
key: deps_${{ matrix.config.os }}_Release_${{ hashfiles('dependencies.txt') }}
- name: Build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
shell: bash
env:
BUILD_TYPE: Release
run: |
if [[ "$OSTYPE" == "msys" ]]; then
python tools/build_dependencies.py ~/deps -b $BUILD_TYPE
else
# Clang and GCC binaries are compatible, so only compile with GCC.
export CC="gcc-14"
export CXX="g++-14"
python3 tools/build_dependencies.py ~/deps
fi
- name: Build Zeus
shell: bash
env:
BUILD_TYPE: Release
CONFIG_TYPE: ${{ matrix.config.preset }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --preset=$CONFIG_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=OFF -DCMAKE_PREFIX_PATH=~/deps -DCMAKE_INSTALL_PREFIX=install/zeus -DZEUS_INSTALL_TARGET=ON
cd ./build
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --config $BUILD_TYPE
else
make
fi
- name: Run tests
shell: bash
working-directory: ./build
env:
BUILD_TYPE: Release
CONFIG_TYPE: ${{ matrix.config.preset }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --target RUN_TESTS --config $BUILD_TYPE
else
make test
fi
- name: Install
shell: bash
working-directory: ./build
env:
BUILD_TYPE: Release
CONFIG_TYPE: ${{ matrix.config.preset }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --target INSTALL --config $BUILD_TYPE
else
make install
fi
- name: Package
shell: bash
working-directory: ./install
env:
CONFIG_TYPE: ${{ matrix.config.preset }}
run: |
if [[ "$OSTYPE" == "msys" ]]; then
7z a zeus-$GITHUB_REF_NAME-$CONFIG_TYPE-x64.zip -r zeus
else
zip zeus-$GITHUB_REF_NAME-$CONFIG_TYPE-x64.zip -r zeus
fi
- name: Publish
uses: softprops/action-gh-release@v2
with:
draft: true
files: "./install/*.zip"