Skip to content

CI: Split into more steps #36

CI: Split into more steps

CI: Split into more steps #36

Workflow file for this run

on: [push, pull_request]
jobs:
builds:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "Windows", os: "windows-2019", generator: "Visual Studio 16 2019" }
# - { name: "Windows", os: "windows-2022", generator: "Visual Studio 17 2022" }
name: ${{ matrix.config.name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
if: matrix.config.name == 'Windows'
- name: Install Conan
run: |
pip install conan==1.* cmake
conan user
conan --version
cmake --version
- name: Conan Install
# TODO: Fix cpack
run: |
conan config set general.revisions_enabled=True
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
echo "Conan install"
conan install . --build missing
- name: CMake
# TODO: Fix cpack
run: |
echo "CMake configuration"
cmake --preset default
echo "CMake build"
cmake --build --preset release
echo "CMake install"
cmake --install .
- name: Create package
# TODO: Fix cpack
run: |
echo "Create package"
git add -A .
git config --global user.email "[email protected]"
git config --global user.name "Fix CPack"
git commit -am "Workaround until CPack works"
git archive -o sauerbraten.zip HEAD
echo "::set-env name=ARTIFACT_FILE::$(ls sauerbraten*.zip)"
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_FILE }}
path: ${{ env.ARTIFACT_FILE }}