mirror of https://github.com/Nonannet/copapy.git
ci updated
This commit is contained in:
parent
a15bfc295e
commit
a6f881ab34
|
|
@ -7,25 +7,6 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_stencils:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install cross compilers
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y mingw-w64
|
|
||||||
|
|
||||||
- name: Build ops obj files
|
|
||||||
run: |
|
|
||||||
bash src/copapy/obj/nativecompile.sh
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: stencil-object-files
|
|
||||||
path: src/copapy/obj/*.o
|
|
||||||
|
|
||||||
build-ubuntu:
|
build-ubuntu:
|
||||||
needs: [build_stencils]
|
needs: [build_stencils]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -38,21 +19,15 @@ jobs:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: stencil-object-files
|
|
||||||
path: src/copapy/obj
|
|
||||||
|
|
||||||
- name: Install compiler
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y gcc-12-mingw-w64-x86-64
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Build ops obj files
|
||||||
|
run: |
|
||||||
|
bash src/copapy/obj/nativecompile.sh
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: python -m pip install -e .[dev]
|
run: python -m pip install -e .[dev]
|
||||||
|
|
||||||
|
|
@ -70,15 +45,19 @@ jobs:
|
||||||
#- name: Lint code with flake8
|
#- name: Lint code with flake8
|
||||||
# run: flake8
|
# run: flake8
|
||||||
|
|
||||||
- name: Upload compiled runner
|
- uses: actions/upload-artifact@v4
|
||||||
uses: actions/upload-artifact@v4
|
if: strategy.job-index == 0
|
||||||
|
with:
|
||||||
|
name: stencil-object-files-linux
|
||||||
|
path: src/copapy/obj/*.o
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
if: strategy.job-index == 0
|
if: strategy.job-index == 0
|
||||||
with:
|
with:
|
||||||
name: runner-linux
|
name: runner-linux
|
||||||
path: bin/*
|
path: bin/*
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
needs: [build_stencils]
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -99,6 +78,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Build ops obj files
|
||||||
|
run: |
|
||||||
|
bash src/copapy/obj/nativecompile_win.sh
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: python -m pip install -e .[dev]
|
run: python -m pip install -e .[dev]
|
||||||
|
|
||||||
|
|
@ -123,8 +106,14 @@ jobs:
|
||||||
#- name: Lint code with flake8
|
#- name: Lint code with flake8
|
||||||
# run: flake8
|
# run: flake8
|
||||||
|
|
||||||
- name: Upload compiled runner
|
- uses: actions/upload-artifact@v4
|
||||||
uses: actions/upload-artifact@v4
|
if: strategy.job-index == 0
|
||||||
|
with:
|
||||||
|
name: stencil-object-files-win
|
||||||
|
path: src/copapy/obj/*.o
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
if: strategy.job-index == 0
|
||||||
with:
|
with:
|
||||||
name: runner-win
|
name: runner-win
|
||||||
path: bin/*
|
path: bin/*
|
||||||
|
|
@ -12,8 +12,3 @@ gcc-12 -c $SRC -O0 -o $DEST/stencils_x86_64_O0.o
|
||||||
gcc-12 -c $SRC -O1 -o $DEST/stencils_x86_64_O1.o
|
gcc-12 -c $SRC -O1 -o $DEST/stencils_x86_64_O1.o
|
||||||
gcc-12 -c $SRC -O2 -o $DEST/stencils_x86_64_O2.o
|
gcc-12 -c $SRC -O2 -o $DEST/stencils_x86_64_O2.o
|
||||||
gcc-12 -c $SRC -O3 -o $DEST/stencils_x86_64_O3.o
|
gcc-12 -c $SRC -O3 -o $DEST/stencils_x86_64_O3.o
|
||||||
|
|
||||||
x86_64-w64-mingw32-gcc --version
|
|
||||||
|
|
||||||
# Windows x86_64 (ARM64)
|
|
||||||
x86_64-w64-mingw32-gcc -O3 -c $SRC -o $DEST/stencils_AMD64_$OPT.o
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set -v
|
||||||
|
|
||||||
|
SRC=src/copapy/stencils.c
|
||||||
|
DEST=src/copapy/obj
|
||||||
|
|
||||||
|
python src/copapy/generate_stencils.py
|
||||||
|
|
||||||
|
mkdir -p $DEST
|
||||||
|
x86_64-w64-mingw32-gcc -c $SRC -O0 -o $DEST/stencils_AMD64_O0.o
|
||||||
|
x86_64-w64-mingw32-gcc -c $SRC -O1 -o $DEST/stencils_AMD64_O1.o
|
||||||
|
x86_64-w64-mingw32-gcc -c $SRC -O2 -o $DEST/stencils_AMD64_O2.o
|
||||||
|
x86_64-w64-mingw32-gcc -c $SRC -O3 -o $DEST/stencils_AMD64_O3.o
|
||||||
|
|
||||||
|
x86_64-w64-mingw32-gcc --version
|
||||||
Loading…
Reference in New Issue