Skip to content

CI: Fix using tools.system.package_manager:mode=install #77

CI: Fix using tools.system.package_manager:mode=install

CI: Fix using tools.system.package_manager:mode=install #77

Workflow file for this run

name: Build Game
on: [push, pull_request]
jobs:
builds:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "Windows VS 16 - Conan 1.x", os: "windows-2019", conan_version: "1.*", zip_appendix: "win64-vs2019" }
- { name: "Windows VS 17 - Conan 2.x", os: "windows-2022", conan_version: "2.*", zip_appendix: "win64-vs2022" }
- { name: "Linux GCC - Conan 1.x", os: "ubuntu-22.04", conan_version: "1.*", zip_appendix: "linux-gcc" }
name: ${{ matrix.config.name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Conan
run: |
pip install conan==${{ matrix.config.conan_version }} cmake
conan user
conan --version
cmake --version
- name: Set Conan 1.x specifics
if: ${{ startsWith(matrix.config.conan_version , '1') }}
run: |
conan config set general.revisions_enabled=True
- name: Create Conan 2.x profile
if: ${{ startsWith(matrix.config.conan_version , '2') }}
run: |
conan profile detect
- name: Install dependencies via Conan
run: |
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
echo "Conan install"
conan install . --build missing -pr:b default -pr:h default -c tools.system.package_manager:mode=install
- name: CMake
# TODO: Fix cpack
run: |
echo "::group::CMake configuration"
cmake --preset default
echo "::endgroup::"
echo "::group::CMake build"
cmake --build --preset release
echo "::endgroup::"
echo "::group::CMake install"
cmake --install build/
echo "::endgroup::"
- name: Create package
# TODO: Fix cpack
run: |
echo "Create package"
version=r`cat version.txt`
echo $version
echo "SAUER_VERSION=${version}" >> "$GITHUB_ENV"
echo "{ARTIFACT_FILE}={value}" >> "$GITHUB_ENV"
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
# TODO: Fix CPack, use ${{ env.ARTIFACT_FILE }}
with:
name: sauerbraten-${{ env.SAUER_VERSION }}-${{ matrix.config.zip_appendix }}.zip
path: |
bin/
bin_unix
bin64/
data/
src/
rpg.bat
sauerbraten.bat
sauerbraten_unix
server-init.cfg
server.bat
CMakeLists.txt
conanfile.txt
.gitignore