Skip to content

Commit e9b9376

Browse files
authored
windwoes (#8)
1 parent 4f01921 commit e9b9376

2 files changed

Lines changed: 20 additions & 33 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
branches: [ master ]
1212

1313
env:
14+
MKN_LIB_LINK_LIB: 1
1415
MKN_KUL_GIT_CO: --depth 1
1516
CURL_GET: curl -fL --retry 3 --retry-delay 2
1617
PATH_GET: https://github.com/mkn/mkn/releases/download/latest
@@ -19,73 +20,56 @@ jobs:
1920
ubuntu:
2021
runs-on: ubuntu-latest
2122
strategy:
22-
fail-fast: false
23-
max-parallel: 4
2423
matrix:
2524
python-version: ['3.14']
2625
steps:
2726
- uses: actions/checkout@v6
28-
2927
- uses: actions/setup-python@v6
3028
with:
3129
python-version: ${{ matrix.python-version }}
32-
architecture: x64
33-
34-
- env:
35-
MKN_LIB_LINK_LIB: 1
36-
run: |
30+
- run: |
31+
set -ex
3732
$CURL_GET -o mkn ${PATH_GET}/mkn_nix
3833
chmod +x mkn
39-
KLOG=2 ./mkn clean build run -dtOa "-std=c++20 -fPIC"
40-
KLOG=2 ./mkn clean build -dtOa "-std=c++20 -fPIC" -p test_module
34+
KLOG=3 ./mkn clean build run -dtOa "-std=c++20 -fPIC"
35+
KLOG=3 ./mkn clean build -dtOa "-std=c++20 -fPIC" -p test_module
4136
python3 -c "import test_module as tm; tm.lol()"
4237
4338
macos:
4439
runs-on: macos-latest
4540
strategy:
46-
fail-fast: false
47-
max-parallel: 4
4841
matrix:
4942
python-version: ['3.14']
5043
steps:
5144
- uses: actions/checkout@v6
52-
5345
- uses: actions/setup-python@v6
5446
with:
5547
python-version: ${{ matrix.python-version }}
56-
architecture: x64
57-
58-
- env:
59-
MKN_LIB_LINK_LIB: 1
60-
run: |
48+
- run: |
49+
set -ex
6150
$CURL_GET -o mkn ${PATH_GET}/mkn_arm_osx
6251
chmod +x mkn
63-
KLOG=2 ./mkn clean build run -dtOa "-std=c++20 -fPIC"
52+
KLOG=3 ./mkn clean build run -dtOa "-std=c++20 -fPIC"
53+
KLOG=3 ./mkn clean build run -dtOa "-std=c++20 -fPIC" -p test
6454
6555
windows:
6656
runs-on: windows-latest
6757
strategy:
68-
fail-fast: false
69-
max-parallel: 4
7058
matrix:
7159
python-version: ['3.14']
7260
steps:
7361
- uses: actions/checkout@v6
74-
7562
- uses: actions/setup-python@v6
7663
with:
7764
python-version: ${{ matrix.python-version }}
78-
architecture: x64
79-
8065
- uses: ilammy/msvc-dev-cmd@v1
81-
with:
82-
arch: amd64
83-
8466
- env:
8567
MKN_CL_PREFERRED: 1
86-
shell: cmd
68+
shell: bash
8769
run: | # /bin/link interferes with cl/link.exe
88-
bash -c "rm /bin/link"
89-
bash -c '$CURL_GET -o mkn.exe ${PATH_GET}/mkn.exe'
90-
bash -c 'KLOG=2 ./mkn clean build run -dtOa "-EHsc -std:c++20"'
91-
bash -c 'KLOG=2 ./mkn clean build run -dtOp test -a "-EHsc -std:c++20"'
70+
set -ex
71+
rm /bin/link
72+
$CURL_GET -o mkn.exe ${PATH_GET}/mkn.exe
73+
KLOG=3 ./mkn clean build run -dtOa "-EHsc -std:c++20"
74+
KLOG=3 ./mkn clean build run -dtOp test -a "-EHsc -std:c++20"
75+
KLOG=3 ./mkn clean build -dtOa "-std:c++20 -EHsc" -p test_module

mod.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ std::string pyexec_for_string(std::string const& cmd) {
104104
KERR << ex;
105105
throw;
106106
}
107-
return kul::String::LINES(pc.outs())[0]; // DROP EOL
107+
auto ret = kul::String::LINES(pc.outs())[0];
108+
if(ret.back() == '\n') ret.pop_back();
109+
if(ret.back() == '\r') ret.pop_back();
110+
return ret;
108111
}
109112

110113
class ModuleMaker : public maiken::Module {

0 commit comments

Comments
 (0)