forked from PaddlePaddle/Paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] add auto pull; add linux and mac test
- Loading branch information
Showing
3 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: "1" | ||
rules: | ||
- base: develop | ||
upstream: PaddlePaddle:develop # change `wei` to the owner of upstream repo | ||
mergeMethod: merge | ||
mergeUnstable: false | ||
conflictReviewers: # Optional, on merge conflict assign a reviewer | ||
- gouzil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Paddle ci test Linux | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Build-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
python-version-with-wheel: | ||
- ["3.8", " 3.8.18", "paddlepaddle-0.0.0-cp38-cp38-linux_x86_64.whl"] | ||
- ["3.9", " 3.9.18", "paddlepaddle-0.0.0-cp39-cp39-linux_x86_64.whl"] | ||
- ["3.10", "3.10.12", "paddlepaddle-0.0.0-cp310-cp310-linux_x86_64.whl"] | ||
- ["3.11", "3.11.6", "paddlepaddle-0.0.0-cp311-cp311-linux_x86_64.whl"] | ||
runs-on: ${{ matrix.os }} | ||
name: linux-py${{ matrix.python-version-with-wheel[0] }}-test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: init system | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install wget curl git make cmake bzip2 neofetch libffi-dev libsqlite3-dev -y | ||
- name: Build Python | ||
run: | | ||
wget --no-verbose https://www.python.org/ftp/python/${{ matrix.python-version-with-wheel[1] }}/Python-${{ matrix.python-version-with-wheel[1] }}.tgz | ||
tar -zvxf Python-${{ matrix.python-version-with-wheel[1] }}.tgz | ||
cd Python-${{ matrix.python-version-with-wheel[1] }}/ | ||
./configure --enable-optimizations --enable-loadable-sqlite-extensions --with-ssl | ||
make -j$(nproc) | ||
sudo make install | ||
- name: install pip packages | ||
run: | | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install --upgrade pip | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install wheel pyyaml ninja | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install -r python/requirements.txt | ||
- name: get env | ||
run: | | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install distro | ||
echo "---------------------- tools/summary_env.py ---------------------------" | ||
python${{ matrix.python-version-with-wheel[0] }} tools/summary_env.py | ||
echo "-------------------------- neofetch ---------------------------" | ||
neofetch | ||
echo "------------------------ pip list -----------------------------" | ||
pip list | ||
- name: run cmake | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -GNinja -DPY_VERSION=${{ matrix.python-version-with-wheel[0] }} -DWITH_GPU=OFF -DWITH_TESTING=ON | ||
- name: paddle build | ||
run: | | ||
cd build | ||
ninja -j$(nproc) | ||
- name: paddle install | ||
run: | | ||
cd build | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install python/dist/${{matrix.python-version-with-wheel[1]}} | ||
- name: paddle run check | ||
run: | | ||
python${{ matrix.python-version-with-wheel[0] }} -c "import paddle; paddle.utils.run_check()" | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.python-version-with-wheel[1] }} | ||
path: build/python/dist/${{ matrix.python-version-with-wheel[1] }} | ||
|
||
- name: run test | ||
run: | | ||
cd build | ||
ctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Paddle ci test mac | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Build-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-13] | ||
python-version-with-wheel: | ||
- ["3.8", " 3.8.18", "paddlepaddle-0.0.0-cp38-cp38-macosx_13_6_x86_64.whl"] | ||
- ["3.9", " 3.9.18", "paddlepaddle-0.0.0-cp39-cp39-macosx_13_6_x86_64.whl"] | ||
- ["3.10", "3.10.12", "paddlepaddle-0.0.0-cp310-cp310-macosx_13_6_x86_64.whl"] | ||
- ["3.11", "3.11.6", "paddlepaddle-0.0.0-cp311-cp311-macosx_13_6_x86_64.whl"] | ||
runs-on: ${{ matrix.os }} | ||
name: linux-py${{ matrix.python-version-with-wheel[0] }}-test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: init system | ||
run: | | ||
brew update | ||
brew install wget curl git make cmake bzip2 neofetch libffi libsqlite3 -y | ||
- name: Build Python | ||
run: | | ||
wget --no-verbose https://www.python.org/ftp/python/${{ matrix.python-version-with-wheel[1] }}/Python-${{ matrix.python-version-with-wheel[1] }}.tgz | ||
tar -zvxf Python-${{ matrix.python-version-with-wheel[1] }}.tgz | ||
cd Python-${{ matrix.python-version-with-wheel[1] }}/ | ||
./configure --enable-optimizations --enable-loadable-sqlite-extensions --with-ssl | ||
make -j$(nproc) | ||
sudo make install | ||
- name: install pip packages | ||
run: | | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install --upgrade pip | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install wheel pyyaml ninja | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install -r python/requirements.txt | ||
- name: get env | ||
run: | | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install distro | ||
echo "---------------------- tools/summary_env.py ---------------------------" | ||
python${{ matrix.python-version-with-wheel[0] }} tools/summary_env.py | ||
echo "-------------------------- neofetch ---------------------------" | ||
neofetch | ||
echo "------------------------ pip list -----------------------------" | ||
pip list | ||
- name: run cmake | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -GNinja -DPY_VERSION=${{ matrix.python-version-with-wheel[0] }} -DWITH_GPU=OFF -DWITH_TESTING=ON | ||
- name: paddle build | ||
run: | | ||
cd build | ||
ninja -j$(nproc) | ||
- name: paddle install | ||
run: | | ||
cd build | ||
python${{ matrix.python-version-with-wheel[0] }} -m pip install python/dist/${{matrix.python-version-with-wheel[1]}} | ||
- name: paddle run check | ||
run: | | ||
python${{ matrix.python-version-with-wheel[0] }} -c "import paddle; paddle.utils.run_check()" | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.python-version-with-wheel[1] }} | ||
path: build/python/dist/${{ matrix.python-version-with-wheel[1] }} | ||
|
||
- name: run test | ||
run: | | ||
cd build | ||
ctest |