fix scripts

This commit is contained in:
blueloveTH 2024-06-10 22:46:21 +08:00
parent 3787a1da1d
commit 0312dbc829
3 changed files with 31 additions and 27 deletions

View File

@ -12,21 +12,17 @@ on:
- 'web/**'
- '**.md'
jobs:
build_win32_amalgamated:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Compile
shell: powershell
run: |
python amalgamate.py
cd amalgamated
cl.exe /std:c++17 /EHsc /utf-8 /Ox /I. /DPK_ENABLE_OS=1 main.cpp /link /out:pkpy.exe
# - uses: actions/upload-artifact@v4
# with:
# name: amalgamated
# path: amalgamated/pkpy.exe
# build_win32_amalgamated:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ilammy/msvc-dev-cmd@v1
# - name: Compile
# shell: powershell
# run: |
# python amalgamate.py
# cd amalgamated
# cl.exe /std:c++17 /EHsc /utf-8 /Ox /I. /DPK_ENABLE_OS=1 main.cpp /link /out:pkpy.exe
build_win32:
runs-on: windows-latest
steps:
@ -109,16 +105,16 @@ jobs:
python scripts/run_tests.py
- name: Benchmark
run: python scripts/run_tests.py benchmark
- run: |
python amalgamate.py
cd plugins/macos/pocketpy
mkdir output
xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
cp -r build/Release/pocketpy.bundle output
- uses: actions/upload-artifact@v4
with:
name: macos
path: plugins/macos/pocketpy/output
# - run: |
# python amalgamate.py
# cd plugins/macos/pocketpy
# mkdir output
# xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
# cp -r build/Release/pocketpy.bundle output
# - uses: actions/upload-artifact@v4
# with:
# name: macos
# path: plugins/macos/pocketpy/output
build_android:
runs-on: ubuntu-latest
steps:

View File

@ -1,5 +1,9 @@
python prebuild.py
SRC=$(find src/ -name "*.cpp")
SRC_C=$(find src/ -name "*.c")
SRC_CPP=$(find src/ -name "*.cpp")
SRC="$SRC_C $SRC_CPP"
g++ -pg -Og -std=c++17 -frtti -Wfatal-errors -o main $SRC src2/main.cpp -Iinclude
./main benchmarks/fib.py
gprof main gmon.out > gprof.txt

View File

@ -1,5 +1,9 @@
python prebuild.py
SRC=$(find src/ -name "*.cpp")
SRC_C=$(find src/ -name "*.c")
SRC_CPP=$(find src/ -name "*.cpp")
SRC="$SRC_C $SRC_CPP"
clang++ -std=c++17 --coverage -O1 -stdlib=libc++ -frtti -Wfatal-errors -o main src2/main.cpp $SRC -Iinclude -DPK_ENABLE_OS=1 -DPK_DEBUG_PRECOMPILED_EXEC=1 -DPK_ENABLE_PROFILER=1
python scripts/run_tests.py