| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- name: build
- on:
- push:
- paths-ignore:
- - 'docs/**'
- - 'web/**'
- - '**.md'
- pull_request:
- paths-ignore:
- - 'docs/**'
- - 'web/**'
- - '**.md'
- jobs:
- build_win:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v3
- - uses: ilammy/msvc-dev-cmd@v1
- - name: Compile
- shell: bash
- run: |
- mkdir -p output/windows/x86_64
- python3 cmake_build.py
- cp main.exe output/windows/x86_64
- cp pocketpy.dll output/windows/x86_64
- - uses: actions/upload-artifact@v3
- with:
- path: output
- - name: Unit Test
- run: python3 scripts/run_tests.py
- - name: Benchmark
- run: python3 scripts/run_tests.py benchmark
- build_linux:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v3
- - name: Setup Clang
- uses: egor-tensin/setup-clang@v1
- with:
- version: 15
- platform: x64
- - name: Install libc++
- run: sudo apt-get install -y libc++-15-dev libc++1-15 libc++abi-15-dev libc++abi1-15 libclang-rt-15-dev
- - name: Unit Test with Coverage
- run: bash run_tests.sh
- - name: Upload coverage reports to Codecov
- uses: codecov/codecov-action@v3
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
- directory: .coverage
- if: github.ref == 'refs/heads/main'
- - name: Compile
- run: |
- export CXX=clang++
- export CC=clang
- mkdir -p output/linux/x86_64
- python3 cmake_build.py
- cp main output/linux/x86_64
- cp libpocketpy.so output/linux/x86_64
- - uses: actions/upload-artifact@v3
- with:
- path: output
- - name: Benchmark
- run: python3 scripts/run_tests.py benchmark
- - name: C Binding Test
- run: bash run_c_binding_test.sh
- build_linux_x86:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Setup Alpine Linux v3.15 for aarch64
- uses: jirutka/setup-alpine@v1
- with:
- arch: x86
- packages: gcc g++ make cmake libc-dev linux-headers python3
- branch: v3.15
- - name: Build and Test
- run: |
- uname -m
- python3 cmake_build.py
- python3 scripts/run_tests.py
- python3 scripts/run_tests.py benchmark
- shell: alpine.sh {0}
- build_macos:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v3
- - name: Compile and Test
- run: |
- python3 cmake_build.py
- python3 scripts/run_tests.py
- - name: Benchmark
- run: python3 scripts/run_tests.py benchmark
- - run: |
- python3 amalgamate.py
- cd plugins/macos/pocketpy
- mkdir -p output/macos
- xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- cp -r build/Release/pocketpy.bundle output/macos
- - uses: actions/upload-artifact@v3
- with:
- path: plugins/macos/pocketpy/output
- build_android:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: subosito/flutter-action@v2
- with:
- flutter-version: '3.3.0'
- channel: 'stable'
- cache: true
- - run: flutter --version
- - name: Compile
- run: |
- python3 amalgamate.py
- cd plugins/flutter/example
- flutter build apk --split-debug-info=.debug-info --split-per-abi
- cd build/app/outputs/flutter-apk
- mkdir -p output/android/arm64-v8a
- mkdir -p output/android/armeabi-v7a
- mkdir -p output/android/x86_64
- unzip -q app-arm64-v8a-release.apk -d tmp
- mv tmp/lib/arm64-v8a/libpocketpy.so output/android/arm64-v8a/libpocketpy.so
- rm -rf tmp
- unzip -q app-armeabi-v7a-release.apk -d tmp
- mv tmp/lib/armeabi-v7a/libpocketpy.so output/android/armeabi-v7a/libpocketpy.so
- rm -rf tmp
- unzip -q app-x86_64-release.apk -d tmp
- mv tmp/lib/x86_64/libpocketpy.so output/android/x86_64/libpocketpy.so
- rm -rf tmp
- - uses: actions/upload-artifact@v3
- with:
- path: plugins/flutter/example/build/app/outputs/flutter-apk/output
|