forked from vcmi/vcmi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4e692f
commit 37a782b
Showing
1 changed file
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
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 | ||
|
||
- name: Dependencies | ||
run: source '${{github.workspace}}/CI/${{matrix.platform}}/before_install.sh' | ||
env: | ||
VCMI_BUILD_PLATFORM: x64 | ||
|
||
- name: Remove old packages | ||
run: | | ||
ls -la ~/.conan/ | ||
ls -la ~/.conan/data/ | ||
ls -la ~/.conan/data/ffmpeg | ||
ls -la ~/.conan/data/ffmpeg/4.4.3/ | ||
ls -la ~/.conan/data/ffmpeg/4.4.3/_/ | ||
ls -la ~/.conan/data/ffmpeg/4.4.3/_/_/ | ||
ls -la ~/.conan/data/ffmpeg/4.4.3/_/_/package | ||
rm -rf ~/.conan/data/ffmpeg/4.4.3/_/_/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: Conan cleanup | ||
if: "${{ matrix.conan_profile != '' }}" | ||
run: "conan remove --builds --src --force '*'" | ||
|
||
- name: Create dependencies archive | ||
if: "${{ matrix.conan_profile != '' }}" | ||
run: "tar -czvf dependencies.tgz -C ~/.conan data" | ||
|
||
- name: Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.platform }} | ||
compression-level: 0 | ||
path: 'dependencies.tgz' |