From 0312dbc829427033e7095eeee3f474e7d1e66cac Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 10 Jun 2024 22:46:21 +0800 Subject: [PATCH] fix scripts --- .github/workflows/main.yml | 46 +++++++++++++++++--------------------- run_profile.sh | 6 ++++- run_tests.sh | 6 ++++- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 573a121e..e88f51d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: diff --git a/run_profile.sh b/run_profile.sh index 68316f8b..fa02515b 100644 --- a/run_profile.sh +++ b/run_profile.sh @@ -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 diff --git a/run_tests.sh b/run_tests.sh index 924a3562..695eedb9 100644 --- a/run_tests.sh +++ b/run_tests.sh @@ -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