Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 16 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 4 additions & 1 deletion mod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading