mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
activate CI
This commit is contained in:
parent
1e365ca72c
commit
58cd2eb78c
310
.github/workflows/main.yml
vendored
310
.github/workflows/main.yml
vendored
@ -1,157 +1,157 @@
|
|||||||
# name: build
|
name: build
|
||||||
# on:
|
on:
|
||||||
# push:
|
push:
|
||||||
# paths-ignore:
|
paths-ignore:
|
||||||
# - 'docs/**'
|
- 'docs/**'
|
||||||
# - 'web/**'
|
- 'web/**'
|
||||||
# - '**.md'
|
- '**.md'
|
||||||
# pull_request:
|
pull_request:
|
||||||
# paths-ignore:
|
paths-ignore:
|
||||||
# - 'docs/**'
|
- 'docs/**'
|
||||||
# - 'web/**'
|
- 'web/**'
|
||||||
# - '**.md'
|
- '**.md'
|
||||||
# jobs:
|
jobs:
|
||||||
# build_win32_amalgamated:
|
build_win32_amalgamated:
|
||||||
# runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
# - name: Compile
|
- name: Compile
|
||||||
# shell: powershell
|
shell: powershell
|
||||||
# run: |
|
run: |
|
||||||
# python amalgamate.py
|
python amalgamate.py
|
||||||
# cd amalgamated
|
cd amalgamated
|
||||||
# cl.exe /std:c++17 /EHsc /utf-8 /Ox /I. /DPK_ENABLE_OS=1 main.cpp /link /out:pkpy.exe
|
cl.exe /std:c++17 /EHsc /utf-8 /Ox /I. /DPK_ENABLE_OS=1 main.cpp /link /out:pkpy.exe
|
||||||
# - uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# path: amalgamated/pkpy.exe
|
path: amalgamated/pkpy.exe
|
||||||
# build_win32:
|
build_win32:
|
||||||
# runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
# - name: Compile
|
- name: Compile
|
||||||
# shell: bash
|
shell: bash
|
||||||
# run: |
|
run: |
|
||||||
# mkdir -p output/windows/x86_64
|
mkdir -p output/windows/x86_64
|
||||||
# python cmake_build.py
|
python cmake_build.py
|
||||||
# cp main.exe output/windows/x86_64
|
cp main.exe output/windows/x86_64
|
||||||
# cp pocketpy.dll output/windows/x86_64
|
cp pocketpy.dll output/windows/x86_64
|
||||||
# - uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# path: output
|
path: output
|
||||||
# - name: Unit Test
|
- name: Unit Test
|
||||||
# run: python scripts/run_tests.py
|
run: python scripts/run_tests.py
|
||||||
# - name: Benchmark
|
- name: Benchmark
|
||||||
# run: python scripts/run_tests.py benchmark
|
run: python scripts/run_tests.py benchmark
|
||||||
# build_linux:
|
build_linux:
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - name: Setup Clang
|
- name: Setup Clang
|
||||||
# uses: egor-tensin/setup-clang@v1
|
uses: egor-tensin/setup-clang@v1
|
||||||
# with:
|
with:
|
||||||
# version: 15
|
version: 15
|
||||||
# platform: x64
|
platform: x64
|
||||||
# - name: Install libc++
|
- 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
|
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
|
- name: Unit Test with Coverage
|
||||||
# run: bash run_tests.sh
|
run: bash run_tests.sh
|
||||||
# - name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
# uses: codecov/codecov-action@v4
|
uses: codecov/codecov-action@v4
|
||||||
# with:
|
with:
|
||||||
# token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
# directory: .coverage
|
directory: .coverage
|
||||||
# if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
# - name: Compile
|
- name: Compile
|
||||||
# run: |
|
run: |
|
||||||
# mkdir -p output/linux/x86_64
|
mkdir -p output/linux/x86_64
|
||||||
# python cmake_build.py
|
python cmake_build.py
|
||||||
# cp main output/linux/x86_64
|
cp main output/linux/x86_64
|
||||||
# cp libpocketpy.so output/linux/x86_64
|
cp libpocketpy.so output/linux/x86_64
|
||||||
# env:
|
env:
|
||||||
# CXX: clang++
|
CXX: clang++
|
||||||
# CC: clang
|
CC: clang
|
||||||
# - uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# path: output
|
path: output
|
||||||
# - name: Benchmark
|
- name: Benchmark
|
||||||
# run: python scripts/run_tests.py benchmark
|
run: python scripts/run_tests.py benchmark
|
||||||
# - name: C Binding Test
|
- name: C Binding Test
|
||||||
# run: bash run_c_binding_test.sh
|
run: bash run_c_binding_test.sh
|
||||||
# build_linux_x86:
|
build_linux_x86:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - name: Setup Alpine Linux for aarch64
|
- name: Setup Alpine Linux for aarch64
|
||||||
# uses: jirutka/setup-alpine@v1
|
uses: jirutka/setup-alpine@v1
|
||||||
# with:
|
with:
|
||||||
# arch: x86
|
arch: x86
|
||||||
# packages: gcc g++ make cmake libc-dev linux-headers python3
|
packages: gcc g++ make cmake libc-dev linux-headers python3
|
||||||
# - name: Build and Test
|
- name: Build and Test
|
||||||
# run: |
|
run: |
|
||||||
# uname -m
|
uname -m
|
||||||
# python cmake_build.py
|
python cmake_build.py
|
||||||
# python scripts/run_tests.py
|
python scripts/run_tests.py
|
||||||
# python scripts/run_tests.py benchmark
|
python scripts/run_tests.py benchmark
|
||||||
# shell: alpine.sh --root {0}
|
shell: alpine.sh --root {0}
|
||||||
# build_darwin:
|
build_darwin:
|
||||||
# runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - name: Compile and Test
|
- name: Compile and Test
|
||||||
# run: |
|
run: |
|
||||||
# python cmake_build.py
|
python cmake_build.py
|
||||||
# python scripts/run_tests.py
|
python scripts/run_tests.py
|
||||||
# - name: Benchmark
|
- name: Benchmark
|
||||||
# run: python scripts/run_tests.py benchmark
|
run: python scripts/run_tests.py benchmark
|
||||||
# - run: |
|
- run: |
|
||||||
# python amalgamate.py
|
python amalgamate.py
|
||||||
# cd plugins/macos/pocketpy
|
cd plugins/macos/pocketpy
|
||||||
# mkdir -p output/macos
|
mkdir -p output/macos
|
||||||
# xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
|
xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
|
||||||
# cp -r build/Release/pocketpy.bundle output/macos
|
cp -r build/Release/pocketpy.bundle output/macos
|
||||||
# - uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# path: plugins/macos/pocketpy/output
|
path: plugins/macos/pocketpy/output
|
||||||
# build_android:
|
build_android:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - uses: nttld/setup-ndk@v1
|
- uses: nttld/setup-ndk@v1
|
||||||
# id: setup-ndk
|
id: setup-ndk
|
||||||
# with:
|
with:
|
||||||
# ndk-version: r23
|
ndk-version: r23
|
||||||
# local-cache: false
|
local-cache: false
|
||||||
# add-to-path: false
|
add-to-path: false
|
||||||
# - name: Compile Shared Library
|
- name: Compile Shared Library
|
||||||
# run: |
|
run: |
|
||||||
# bash build_android.sh arm64-v8a
|
bash build_android.sh arm64-v8a
|
||||||
# bash build_android.sh armeabi-v7a
|
bash build_android.sh armeabi-v7a
|
||||||
# bash build_android.sh x86_64
|
bash build_android.sh x86_64
|
||||||
|
|
||||||
# mkdir -p output/android/arm64-v8a
|
mkdir -p output/android/arm64-v8a
|
||||||
# mkdir -p output/android/armeabi-v7a
|
mkdir -p output/android/armeabi-v7a
|
||||||
# mkdir -p output/android/x86_64
|
mkdir -p output/android/x86_64
|
||||||
|
|
||||||
# cp build/android/arm64-v8a/libpocketpy.so output/android/arm64-v8a
|
cp build/android/arm64-v8a/libpocketpy.so output/android/arm64-v8a
|
||||||
# cp build/android/armeabi-v7a/libpocketpy.so output/android/armeabi-v7a
|
cp build/android/armeabi-v7a/libpocketpy.so output/android/armeabi-v7a
|
||||||
# cp build/android/x86_64/libpocketpy.so output/android/x86_64
|
cp build/android/x86_64/libpocketpy.so output/android/x86_64
|
||||||
# env:
|
env:
|
||||||
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||||
# - uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# path: output
|
path: output
|
||||||
# build_ios:
|
build_ios:
|
||||||
# runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# - name: Compile Frameworks
|
- name: Compile Frameworks
|
||||||
# run: |
|
run: |
|
||||||
# git clone https://github.com/leetal/ios-cmake --depth 1 ~/ios-cmake
|
git clone https://github.com/leetal/ios-cmake --depth 1 ~/ios-cmake
|
||||||
# bash build_ios.sh
|
bash build_ios.sh
|
||||||
# mkdir -p output/ios
|
mkdir -p output/ios
|
||||||
# cp -r build/pocketpy.xcframework output/ios/pocketpy.xcframework
|
cp -r build/pocketpy.xcframework output/ios/pocketpy.xcframework
|
||||||
# - uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# path: output
|
path: output
|
||||||
|
78
.github/workflows/website.yml
vendored
78
.github/workflows/website.yml
vendored
@ -1,42 +1,42 @@
|
|||||||
# name: website
|
name: website
|
||||||
|
|
||||||
# on:
|
on:
|
||||||
# push:
|
push:
|
||||||
# branches: [ main ]
|
branches: [ main ]
|
||||||
# pull_request:
|
pull_request:
|
||||||
# branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
# permissions:
|
permissions:
|
||||||
# contents: write
|
contents: write
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# deploy:
|
deploy:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# ###################################################
|
###################################################
|
||||||
# - uses: actions/setup-node@v3.1.1
|
- uses: actions/setup-node@v3.1.1
|
||||||
# - name: Retype build
|
- name: Retype build
|
||||||
# run: |
|
run: |
|
||||||
# python scripts/build_references.py
|
python scripts/build_references.py
|
||||||
# cd docs
|
cd docs
|
||||||
# npm install retypeapp --global
|
npm install retypeapp --global
|
||||||
# retype build
|
retype build
|
||||||
# ###################################################
|
###################################################
|
||||||
# - name: Setup emsdk
|
- name: Setup emsdk
|
||||||
# uses: mymindstorm/setup-emsdk@v12
|
uses: mymindstorm/setup-emsdk@v12
|
||||||
# with:
|
with:
|
||||||
# version: 3.1.25
|
version: 3.1.25
|
||||||
# actions-cache-folder: 'emsdk-cache'
|
actions-cache-folder: 'emsdk-cache'
|
||||||
# - name: Compile
|
- name: Compile
|
||||||
# run: |
|
run: |
|
||||||
# bash build_web.sh
|
bash build_web.sh
|
||||||
# mv web docs/.retype/static
|
mv web docs/.retype/static
|
||||||
# ###################################################
|
###################################################
|
||||||
# - uses: crazy-max/ghaction-github-pages@v3
|
- uses: crazy-max/ghaction-github-pages@v3
|
||||||
# with:
|
with:
|
||||||
# target_branch: gh-pages
|
target_branch: gh-pages
|
||||||
# build_dir: docs/.retype
|
build_dir: docs/.retype
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user