Skip to content

Commit

Permalink
test linux
Browse files Browse the repository at this point in the history
  • Loading branch information
tunmx committed Dec 3, 2024
1 parent 4564b4e commit 8cb683e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 62 deletions.
85 changes: 24 additions & 61 deletions .github/workflows/build_wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,81 +9,44 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}

jobs:
build_linux_x86:
name: Compile Linux-Ubuntu-x86
runs-on: ubuntu-latest
container:
image: ubuntu:18.04 # 使用 Ubuntu 18.04 容器
build_macos_arm64:
name: Compile MacOS-arm64
runs-on: macos-14
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# 首先安装基础工具
- name: Install basic tools
run: |
apt-get update
apt-get install -y git python3 python3-pip wget software-properties-common
# Step 2: Setting up the Python environment
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# Step 3: Synchronize and update submodules
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
# Step 4: Install necessary dependencies for building the CMake project
- name: Install Dependencies
run: |
apt-get install -y build-essential libgtk-3-dev libavcodec-dev libavformat-dev libjpeg-dev libswscale-dev
- name: Start Building
brew install cmake
# Step 5: Build the SDK
- name: Start Building the InspireFace-Linux-x86
run: |
bash command/build_wheel_linux_ubuntu18.sh
bash command/build_wheel_macos_arm64.sh
ls python/dist
# Step 6: Upload to PyPI
- name: Upload to PyPI
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip3 install twine
twine upload python/dist/* -u __token__ -p $PYPI_API_TOKEN
# build_macos_arm64:
# name: Compile MacOS-arm64
# runs-on: macos-14
# strategy:
# matrix:
# python-version: ["3.8", "3.9", "3.10"]

# steps:
# # Step 1: Checkout the repository
# - name: Checkout Repository
# uses: actions/checkout@v4

# # Step 2: Setting up the Python environment
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# # Step 3: Synchronize and update submodules
# - name: Update submodules
# run: |
# git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty

# # Step 4: Install necessary dependencies for building the CMake project
# - name: Install Dependencies
# run: |
# brew install cmake

# # Step 5: Build the SDK
# - name: Start Building the InspireFace-Linux-x86
# run: |
# bash command/build_wheel_macos_arm64.sh
# ls python/dist

# # Step 6: Upload to PyPI
# - name: Upload to PyPI
# env:
# PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# run: |
# pip install twine
# twine upload python/dist/* -u __token__ -p $PYPI_API_TOKEN
pip install twine
twine upload python/dist/* -u __token__ -p $PYPI_API_TOKEN
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
# Current version
set(INSPIRE_FACE_VERSION_MAJOR 1)
set(INSPIRE_FACE_VERSION_MINOR 2)
set(INSPIRE_FACE_VERSION_PATCH 102)
set(INSPIRE_FACE_VERSION_PATCH 103)

# Converts the version number to a string
string(CONCAT INSPIRE_FACE_VERSION_MAJOR_STR ${INSPIRE_FACE_VERSION_MAJOR})
Expand Down

0 comments on commit 8cb683e

Please sign in to comment.