diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11cc812..c890014 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,7 @@ on: branches: [ master ] env: + MKN_LIB_LINK_LIB: 1 MKN_KUL_GIT_CO: --depth 1 CURL_GET: curl -fL --retry 3 --retry-delay 2 PATH_GET: https://github.com/mkn/mkn/releases/download/latest @@ -19,73 +20,56 @@ jobs: ubuntu: runs-on: ubuntu-latest strategy: - fail-fast: false - max-parallel: 4 matrix: python-version: ['3.14'] steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - architecture: x64 - - - env: - MKN_LIB_LINK_LIB: 1 - run: | + - run: | + set -ex $CURL_GET -o mkn ${PATH_GET}/mkn_nix chmod +x mkn - KLOG=2 ./mkn clean build run -dtOa "-std=c++20 -fPIC" - KLOG=2 ./mkn clean build -dtOa "-std=c++20 -fPIC" -p test_module + KLOG=3 ./mkn clean build run -dtOa "-std=c++20 -fPIC" + KLOG=3 ./mkn clean build -dtOa "-std=c++20 -fPIC" -p test_module python3 -c "import test_module as tm; tm.lol()" macos: runs-on: macos-latest strategy: - fail-fast: false - max-parallel: 4 matrix: python-version: ['3.14'] steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - architecture: x64 - - - env: - MKN_LIB_LINK_LIB: 1 - run: | + - run: | + set -ex $CURL_GET -o mkn ${PATH_GET}/mkn_arm_osx chmod +x mkn - KLOG=2 ./mkn clean build run -dtOa "-std=c++20 -fPIC" + KLOG=3 ./mkn clean build run -dtOa "-std=c++20 -fPIC" + KLOG=3 ./mkn clean build run -dtOa "-std=c++20 -fPIC" -p test windows: runs-on: windows-latest strategy: - fail-fast: false - max-parallel: 4 matrix: python-version: ['3.14'] steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - architecture: x64 - - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: amd64 - - env: MKN_CL_PREFERRED: 1 - shell: cmd + shell: bash run: | # /bin/link interferes with cl/link.exe - bash -c "rm /bin/link" - bash -c '$CURL_GET -o mkn.exe ${PATH_GET}/mkn.exe' - bash -c 'KLOG=2 ./mkn clean build run -dtOa "-EHsc -std:c++20"' - bash -c 'KLOG=2 ./mkn clean build run -dtOp test -a "-EHsc -std:c++20"' + set -ex + rm /bin/link + $CURL_GET -o mkn.exe ${PATH_GET}/mkn.exe + KLOG=3 ./mkn clean build run -dtOa "-EHsc -std:c++20" + KLOG=3 ./mkn clean build run -dtOp test -a "-EHsc -std:c++20" + KLOG=3 ./mkn clean build -dtOa "-std:c++20 -EHsc" -p test_module diff --git a/mod.cpp b/mod.cpp index 0a8a856..0184500 100644 --- a/mod.cpp +++ b/mod.cpp @@ -104,7 +104,10 @@ std::string pyexec_for_string(std::string const& cmd) { KERR << ex; throw; } - return kul::String::LINES(pc.outs())[0]; // DROP EOL + auto ret = kul::String::LINES(pc.outs())[0]; + if(ret.back() == '\n') ret.pop_back(); + if(ret.back() == '\r') ret.pop_back(); + return ret; } class ModuleMaker : public maiken::Module {