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
on: | |
push: | |
branches: | |
- main | |
- ci_test | |
paths: | |
- '.github/**' | |
- 'src/**' | |
- 'SConstruct' | |
- 'build.py' | |
jobs: | |
setup-sdk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check sdk package cache | |
id: cache-sdk-restore | |
uses: actions/cache/restore@v4 | |
env: | |
cache-name: adxle-sdk | |
with: | |
path: ./cri | |
key: ${{ env.cache-name }}-${{ hashFiles('./get_adxle_sdk.py') }} | |
- name: Install ADXLE SDK | |
if: ${{ steps.adxle-sdk.outputs.cache-hit != 'true' }} | |
run: python get_adxle_sdk.py | |
- name: Check sdk package cache | |
id: cache-sdk-save | |
uses: actions/cache/save@v4 | |
with: | |
path: ./cri | |
key: ${{ env.cache-name }}-${{ hashFiles('./get_adxle_sdk.py') }} | |
# android: | |
# name: Build for Android | |
# runs-on: ubuntu-20.04 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Update Submodules | |
# run: git submodule update --init --recursive | |
# - name: Build binaries | |
# run: | | |
# sudo apt-get install scons | |
# python3 get_adx2le_sdk.py | |
# python3 build.py platform=android | |
# - name: Upload binaries | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: bin_android | |
# path: ./godot-proj/addons/adxle/bin | |
macos: | |
name: Build for macOS | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Submodules | |
run: git submodule update --init --recursive | |
- name: Check sdk package cache | |
id: restore-sdk-restore | |
uses: actions/cache/restore@v4 | |
env: | |
cache-name: adxle-sdk | |
with: | |
path: ./cri | |
key: ${{ env.cache-name }}-${{ hashFiles('./get_adxle_sdk.py') }} | |
fail-on-cache-miss: true | |
- name: Build binaries | |
run: | | |
brew install scons | |
python3 build.py platform=macos | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bin_macos | |
path: ./godot-proj/addons/adxle/bin | |
# ios: | |
# name: Build for iOS | |
# runs-on: macOS-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Update Submodules | |
# run: git submodule update --init --recursive | |
# - name: Build binaries | |
# run: | | |
# brew install scons | |
# python3 get_adx2le_sdk.py | |
# python3 build.py platform=ios | |
# - name: Upload binaries | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: bin_ios | |
# path: ./godot-proj/addons/adxle/bin | |
windows: | |
name: Build for Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Submodules | |
run: git submodule update --init --recursive | |
- name: Check sdk package cache | |
id: restore-sdk-restore | |
uses: actions/cache/restore@v4 | |
env: | |
cache-name: adxle-sdk | |
with: | |
path: ./cri | |
key: ${{ env.cache-name }}-${{ hashFiles('./get_adxle_sdk.py') }} | |
fail-on-cache-miss: true | |
- name: Build binaries | |
run: | | |
python -m pip install scons | |
python build.py platform=windows | |
shell: cmd | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bin_windows | |
path: ./godot-proj/addons/adxle/bin | |
# web: | |
# name: Build for Web | |
# runs-on: ubuntu-20.04 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Update Submodules | |
# run: git submodule update --init --recursive | |
# - name: Setup emsdk | |
# uses: mymindstorm/setup-emsdk@v12 | |
# with: | |
# version: 3.1.18 | |
# actions-cache-folder: './emsdk' | |
# - name: Build binaries | |
# run: | | |
# sudo apt-get install scons | |
# python3 get_adx2le_sdk.py | |
# python3 build.py platform=web | |
# - name: Upload binaries | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: bin_web | |
# path: ./godot-proj/addons/adxle/bin | |
merge: | |
name: Merge | |
runs-on: ubuntu-20.04 | |
# needs: [android, macos, ios, windows, web] | |
needs: [macos, windows] | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Download Android binaries | |
# uses: actions/download-artifact@v1 | |
# with: | |
# name: bin_android | |
- name: Download macOS binaries | |
uses: actions/download-artifact@v1 | |
with: | |
name: bin_macos | |
# - name: Download iOS binaries | |
# uses: actions/download-artifact@v1 | |
# with: | |
# name: bin_ios | |
- name: Download Windows binaries | |
uses: actions/download-artifact@v1 | |
with: | |
name: bin_windows | |
# - name: Download web binaries | |
# uses: actions/download-artifact@v1 | |
# with: | |
# name: bin_web | |
- name: Copy binaries | |
# run: | | |
# mkdir ./godot-proj/addons/adxle/bin | |
# cp -r bin_android/android ./godot-proj/addons/adxle/bin/ | |
# cp -r bin_macos/macos ./godot-proj/addons/adxle/bin/ | |
# cp -r bin_ios/ios ./godot-proj/addons/adxle/bin/ | |
# cp -r bin_windows/windows ./godot-proj/addons/adxle/bin/ | |
# cp -r bin_web/web ./godot-proj/addons/adxle/bin/ | |
run: | | |
mkdir ./godot-proj/addons/adxle/bin | |
cp -r bin_macos/macos ./godot-proj/addons/adxle/bin/ | |
cp -r bin_windows/windows ./godot-proj/addons/adxle/bin/ | |
- name: Upload built package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: addons | |
path: ./godot-proj/addons |