|
| 1 | +name: build |
| 2 | + |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: [ master ] |
| 10 | + pull_request: |
| 11 | + branches: [ master ] |
| 12 | + |
| 13 | +env: |
| 14 | + MKN_KUL_GIT_CO: --depth 1 |
| 15 | + |
| 16 | +jobs: |
| 17 | + ubuntu: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + max-parallel: 4 |
| 22 | + matrix: |
| 23 | + python-version: ['3.12', '3.13', '3.14'] |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v6 |
| 26 | + |
| 27 | + - uses: actions/setup-python@v6 |
| 28 | + with: |
| 29 | + python-version: ${{ matrix.python-version }} |
| 30 | + architecture: x64 |
| 31 | + |
| 32 | + - env: |
| 33 | + MKN_LIB_LINK_LIB: 1 |
| 34 | + run: | |
| 35 | + python3 -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" |
| 36 | + curl -fL --retry 3 --retry-delay 2 -o mkn https://github.com/mkn/mkn/releases/download/latest/mkn_nix |
| 37 | + chmod +x mkn |
| 38 | + KLOG=2 ./mkn clean build run -dtOa "-std=c++20 -fPIC" |
| 39 | + KLOG=2 ./mkn clean build -dtOa "-std=c++20 -fPIC" -p test_module |
| 40 | + python3 -c "import test_module as tm; tm.lol()" |
| 41 | +
|
| 42 | + macos: |
| 43 | + runs-on: macos-latest |
| 44 | + strategy: |
| 45 | + fail-fast: false |
| 46 | + max-parallel: 4 |
| 47 | + matrix: |
| 48 | + python-version: ['3.12', '3.13', '3.14'] |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v6 |
| 51 | + |
| 52 | + - uses: actions/setup-python@v6 |
| 53 | + with: |
| 54 | + python-version: ${{ matrix.python-version }} |
| 55 | + architecture: x64 |
| 56 | + |
| 57 | + - env: |
| 58 | + MKN_LIB_LINK_LIB: 1 |
| 59 | + run: | |
| 60 | + python3 -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" |
| 61 | + curl -fL --retry 3 --retry-delay 2 -o mkn https://github.com/mkn/mkn/releases/download/latest/mkn_arm_osx |
| 62 | + chmod +x mkn |
| 63 | + KLOG=2 ./mkn clean build run -dtOa "-std=c++20 -fPIC" |
| 64 | + KLOG=2 ./mkn clean build -dtOa "-std=c++20 -fPIC" -p test_module |
| 65 | + python3 -c "import test_module as tm; tm.lol()" |
| 66 | +
|
| 67 | + windows: |
| 68 | + runs-on: windows-latest |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + max-parallel: 4 |
| 72 | + matrix: |
| 73 | + python-version: ['3.12', '3.13', '3.14'] |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v6 |
| 76 | + |
| 77 | + - uses: actions/setup-python@v6 |
| 78 | + with: |
| 79 | + python-version: ${{ matrix.python-version }} |
| 80 | + architecture: x64 |
| 81 | + |
| 82 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 83 | + with: |
| 84 | + arch: amd64 |
| 85 | + |
| 86 | + - env: |
| 87 | + MKN_CL_PREFERRED: 1 |
| 88 | + shell: cmd |
| 89 | + run: | # /bin/link interferes with cl/link.exe |
| 90 | + python3 -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" |
| 91 | + bash -c "rm /bin/link" |
| 92 | + bash -c 'curl -Lo mkn.exe https://github.com/mkn/mkn/releases/download/latest/mkn.exe' |
| 93 | + bash -c 'KLOG=2 ./mkn clean build run -dtOa "-EHsc -std:c++20"' |
| 94 | + bash -c 'KLOG=2 ./mkn clean build run -dtOp test -a "-EHsc -std:c++20"' |
| 95 | + bash -c 'KLOG=2 ./mkn clean build -dtOp test_module -a "-EHsc -std:c++20"' |
| 96 | + bash -c 'python3 -c "import test_module as tm; tm.lol()"' |
0 commit comments