Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated wheel release mechanism #511

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
34 changes: 18 additions & 16 deletions .github/workflows/build_nix.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@

name: Build Tick on Ubuntu

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
TICK_DEBUG: 0
TICK_WERROR: 0
MKN_COMPILE_THREADS: 2
MKN_GCC_PREFERRED: 1
KLOG: 3

jobs:
build:
Expand All @@ -21,10 +25,10 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.7', '3.9', '3.10', '3.11'] # '3.8' has "'tp_print' is deprecated [-Werror,-Wdeprecated-declarations]"
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -33,32 +37,30 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64





- name: info
run: |
python3 -V
gcc -v
swig -version

- name: pip
- name: pip # tensorflow not released for 3.12 as of 26-OCT-2023
run: |
python3 -m pip install wheel pip --upgrade
python3 -m pip install -r requirements.txt
python3 -m pip install tensorflow-cpu
python3 -V
python3 -m pip install -U pip
python3 -m pip install -U build twine wheel setuptools
python3 -m pip install -U -r requirements.txt
[ "${{ matrix.python-version }}" != "3.12" ] && python3 -m pip install tensorflow-cpu

- name: build
run: |
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_nix
chmod +x mkn
PATH=$PWD:$PATH KLOG=3 ./sh/mkn.sh
./mkn -C lib build -g 0 -dtOa "-fPIC -std=c++17"

- name: cpptest
run: |
PATH=$PWD:$PATH KLOG=3 ./sh/gtest.sh
chmod +x sh/gtest_all.sh
PATH=$PWD:$PATH ./sh/gtest_all.sh "-fPIC -std=c++17"

- name: pytest
run: |
python3 setup.py pytest
run: chmod +x sh/pytest.sh && ./sh/pytest.sh
72 changes: 72 additions & 0 deletions .github/workflows/build_osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

name: Build Tick on OSX

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
MKN_COMPILE_THREADS: 2
KLOG: 3

jobs:
build:
name: Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
max-parallel: 6
matrix:
os: [ macos-12, macos-13, macos-latest]
python-version: ['3.11', '3.12']

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: info
run: |
python3 -V
clang -v
swig -version || ( brew update && brew install swig && swig -version )

- name: pip
run: |
python3 -m pip install wheel pip --upgrade
python3 -m pip install -r requirements.txt

- name: build_arm
if: matrix.os == 'macos-latest'
run: |
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_arm_osx
chmod +x mkn
./mkn -C lib build -g 0 -dtOa "-fPIC -std=c++17"


- name: build_x86
if: matrix.os != 'macos-latest'
run: |
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_x86_osx
chmod +x mkn
./mkn -C lib build -g 0 -dtOa "-fPIC -std=c++17"

- name: cpptest
run: |
chmod +x sh/gtest_all.sh
PATH=$PWD:$PATH ./sh/gtest_all.sh "-fPIC -std=c++17"

- name: pytest
run: |
chmod +x sh/pytest.sh && ./sh/pytest.sh
63 changes: 0 additions & 63 deletions .github/workflows/build_osx.yml.off

This file was deleted.

26 changes: 15 additions & 11 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@

name: Build Tick on Windows

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
TICK_DEBUG: 0
TICK_WERROR: 0
MKN_CL_PREFERRED: 1
MKN_COMPILE_THREADS: 2
KLOG: 3


jobs:
build:
Expand All @@ -22,7 +26,7 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -50,15 +54,15 @@ jobs:
python3 -m pip install -r requirements.txt

- name: build
run: | # MINGW link interferres with MSVC link.exe
bash -c "rm /bin/link"
bash -c "curl -Lo mkn.exe https://github.com/mkn/mkn/releases/download/latest/mkn.exe"
bash -c 'PATH=$PWD:$PATH KLOG=3 ./sh/mkn.sh'
shell: bash
run: |
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn.exe
./mkn -C lib build -g 0 -dtOa "-std:c++17 -EHsc"

- name: cpptest
run: |
bash -c 'PATH=$PWD:$PATH KLOG=3 ./sh/gtest.sh'
shell: bash
run: PATH=$PWD:$PATH ./sh/gtest_all.sh "-std:c++17 -EHsc"

- name: pytest
run: |
python -m unittest discover -v . "*_test.py"
shell: bash
run: ./sh/pytest.sh
Loading
Loading