Skip to content

Commit

Permalink
fix git workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smanolloff committed Oct 16, 2024
1 parent 37ae3dd commit 62bd1a5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,22 +194,20 @@ jobs:
with:
submodules: recursive

# TODO: move after Prepare CI step
- name: Install libtorch dependencies
if: "${{ matrix.mmai_deps != '' }}"
run: source '${{github.workspace}}/CI/fetch_libtorch.sh' 'v1.0' '${{matrix.mmai_deps}}'

- name: Prepare CI
if: "${{ matrix.before_install != '' }}"
run: source '${{github.workspace}}/CI/before_install/${{matrix.before_install}}'
env:
VCMI_BUILD_PLATFORM: x64
MMAI: ${{matrix.mmai}}

- name: Install Conan Dependencies
if: "${{ matrix.conan_prebuilts != '' }}"
run: source '${{github.workspace}}/CI/install_conan_dependencies.sh' '${{matrix.conan_prebuilts}}'

- name: Install MMAI dependencies
if: "${{ matrix.mmai_deps != '' }}"
run: source '${{github.workspace}}/CI/install_mmai_dependencies.sh' '${{matrix.mmai_deps}}'

# ensure the ccache for each PR is separate so they don't interfere with each other
# fall back to ccache of the vcmi/vcmi repo if no PR-specific ccache is found
- name: ccache for PRs
Expand Down Expand Up @@ -289,7 +287,7 @@ jobs:
- name: Build Number
run: |
source '${{github.workspace}}/CI/get_package_name.sh'
if [ "${{matrix.mmai}}" == "1" ]; then
if [ '${{matrix.mmai_deps}}' ]; then
VCMI_PACKAGE_FILE_NAME+="-mmai"
fi
if [ '${{ matrix.artifact_platform }}' ]; then
Expand All @@ -303,7 +301,7 @@ jobs:

- name: Configure
run: |
if [ "${{matrix.mmai}}" == "1" ]
if [ '${{matrix.mmai_deps}}' ]
then
MMAI_FLAGS="-DENABLE_MMAI=ON"
else
Expand Down
9 changes: 0 additions & 9 deletions CI/fetch_libtorch.sh

This file was deleted.

8 changes: 8 additions & 0 deletions CI/install_mmai_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

platform=$1
ARCHIVE_URL="https://github.com/smanolloff/vcmi-libtorch-builds/releases/download/v1.0/vcmi-libtorch-$platform.txz"

curl -fL "$ARCHIVE_URL" | tar -xJ -C AI/MMAI

[ -d AI/MMAI/libtorch ] || { ls -lah AI/MMAI; echo "failed to extract libtorch"; exit 1; }

0 comments on commit 62bd1a5

Please sign in to comment.