... #171
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
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
deployments: write | |
pages: write | |
jobs: | |
build_win32: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: CMake Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --config Release --parallel 4 | |
cp Release/ImGuiExample.exe ../workdir/ | |
# cp pocketpy/Release/pocketpy.dll ../workdir/ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: win32 | |
path: workdir | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: CMake Build | |
run: | | |
brew install sdl2 | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --config Release --parallel 4 | |
cp ImGuiExample ../workdir/ | |
# cp pocketpy/libpocketpy.dylib ../workdir/ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos | |
path: workdir | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- run: sudo apt-get install ninja-build | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Build APK | |
run: | | |
pip install cmake==3.26.3 | |
cd android | |
chmod +x ./gradlew | |
./gradlew --no-daemon assembleDebug | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android | |
path: android/app/build/outputs/apk/debug/app-debug.apk | |
build_web: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v12 | |
with: | |
version: 3.1.37 | |
actions-cache-folder: 'emsdk-cache' | |
- name: Compile | |
run: bash build_web.sh | |
- uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: build/web | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |