Skip to content

Commit

Permalink
Try prebuilts generation via CI
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanSavenko committed Aug 17, 2024
1 parent d4e692f commit c3d8a80
Showing 1 changed file with 137 additions and 0 deletions.
137 changes: 137 additions & 0 deletions .github/workflows/prebuilts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: VCMI - dependencies

on:
push:
workflow_dispatch:

jobs:
build:
strategy:
matrix:
include:
# - platform: mac-intel
# os: macos-13
# test: 0
# pack: 1
# pack_type: Release
# extension: dmg
# preset: macos-conan-ninja-release
# conan_profile: macos-intel
# conan_options: --options with_apple_system_libs=True
# artifact_platform: intel
# - platform: mac-arm
# os: macos-13
# test: 0
# pack: 1
# pack_type: Release
# extension: dmg
# preset: macos-arm-conan-ninja-release
# conan_profile: macos-arm
# conan_options: --options with_apple_system_libs=True
# artifact_platform: arm
# - platform: ios
# os: macos-13
# test: 0
# pack: 1
# pack_type: Release
# extension: ipa
# preset: ios-release-conan-ccache
# conan_profile: ios-arm64
# conan_options: --options with_apple_system_libs=True
# - platform: msvc
# os: windows-latest
# test: 0
# pack: 1
# pack_type: RelWithDebInfo
# extension: exe
# preset: windows-msvc-release
- platform: mingw
os: ubuntu-22.04
test: 0
pack: 1
pack_type: Release
extension: exe
cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
cmake_args: -G Ninja
preset: windows-mingw-conan-linux
conan_profile: mingw64-linux.jinja
- platform: mingw-32
os: ubuntu-22.04
test: 0
pack: 1
pack_type: Release
extension: exe
cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
cmake_args: -G Ninja
preset: windows-mingw-conan-linux
conan_profile: mingw32-linux.jinja
# - platform: android-32
# os: macos-14
# extension: apk
# preset: android-conan-ninja-release
# conan_profile: android-32
# conan_options: --conf tools.android:ndk_path=$ANDROID_NDK_ROOT
# artifact_platform: armeabi-v7a
# - platform: android-64
# os: macos-14
# extension: apk
# preset: android-conan-ninja-release
# conan_profile: android-64
# conan_options: --conf tools.android:ndk_path=$ANDROID_NDK_ROOT
# artifact_platform: arm64-v8a
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Dependencies
run: source '${{github.workspace}}/CI/${{matrix.platform}}/before_install.sh'
env:
VCMI_BUILD_PLATFORM: x64

- name: Remove old packages
run: rm -rf '~/.conan//data/ffmpeg/*/_/_/package'

- uses: actions/setup-python@v5
if: "${{ matrix.conan_profile != '' }}"
with:
python-version: '3.10'

- name: Conan setup
if: "${{ matrix.conan_profile != '' }}"
run: |
pip3 install 'conan<2.0'
conan profile new default --detect
conan install . \
--install-folder=conan-generated \
--no-imports \
--build=missing \
--profile:build=default \
--profile:host=CI/conan/${{ matrix.conan_profile }} \
${{ matrix.conan_options }}
env:
GENERATE_ONLY_BUILT_CONFIG: 1

# - name: Build Number
# run: |
# source '${{github.workspace}}/CI/get_package_name.sh'
# if [ '${{ matrix.artifact_platform }}' ]; then
# VCMI_PACKAGE_FILE_NAME+="-${{ matrix.artifact_platform }}"
# fi
# echo VCMI_PACKAGE_FILE_NAME="$VCMI_PACKAGE_FILE_NAME" >> $GITHUB_ENV
# echo VCMI_PACKAGE_NAME_SUFFIX="$VCMI_PACKAGE_NAME_SUFFIX" >> $GITHUB_ENV
# echo VCMI_PACKAGE_GOLDMASTER="$VCMI_PACKAGE_GOLDMASTER" >> $GITHUB_ENV
# env:
# PULL_REQUEST: ${{ github.event.pull_request.number }}
#
# - name: Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.VCMI_PACKAGE_FILE_NAME }} - ${{ matrix.platform }}
# path: |
# ${{github.workspace}}/out/build/${{matrix.preset}}/${{ env.VCMI_PACKAGE_FILE_NAME }}.${{ matrix.extension }}

0 comments on commit c3d8a80

Please sign in to comment.