diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 857a48ed..eae66e7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,19 +10,16 @@ jobs: shell: bash run: | CL -std:c++17 -GR- -EHsc -O2 -Fe:pocketpy src/main.cpp - python3 scripts/run_tests.py - ./pocketpy tests/1.py - ./pocketpy tests/2.py - build_linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Compiling - run: | - bash build_cpp.sh - python3 scripts/run_tests.py - ./pocketpy tests/1.py - ./pocketpy tests/2.py + mv src/pocketpy.h src/pocketpy.cpp + CL -std:c++17 -GR- -EHsc -O2 -LD -Fe:pocketpy src/pocketpy.cpp + pocketpy.exe tests/1.py + pocketpy.exe tests/2.py + mkdir -p output/windows/x86_64 + mv pocketpy.exe output/windows/x86_64 + mv pocketpy.dll output/windows/x86_64 + - uses: actions/upload-artifact@v3 + with: + path: output build_web: runs-on: ubuntu-latest steps: @@ -36,10 +33,60 @@ jobs: run: emcc -v - name: Compiling run: | + mkdir -p output/web/lib bash build_wasm.sh + cp web/lib/* output/web/lib - uses: crazy-max/ghaction-github-pages@v3 with: target_branch: gh-pages build_dir: web env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/upload-artifact@v3 + with: + path: output + build_linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Compiling + run: | + bash build_cpp.sh + python3 scripts/run_tests.py + ./pocketpy tests/1.py + ./pocketpy tests/2.py + mkdir -p output/linux/x86_64 + mv pocketpy output/linux/x86_64 + - uses: actions/upload-artifact@v3 + with: + path: output + build_android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + flutter-version: '3.0.0' + channel: 'stable' + - run: flutter --version + - name: Compiling + 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 \ No newline at end of file diff --git a/.github/workflows/main.zip b/.github/workflows/main.zip deleted file mode 100644 index 98f58c52..00000000 Binary files a/.github/workflows/main.zip and /dev/null differ