Add mac ci actions #3
Workflow file for this run
This file contains hidden or 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
name: PR-CI-Mac | |
on: | |
workflow_call: | |
env: | |
PR_ID: ${{ github.event.pull_request.number }} | |
COMMIT_ID: ${{ github.event.pull_request.head.sha }} | |
ci_scripts: ${{ github.workspace }}/ci | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-and-test: | |
runs-on: | |
group: Mac-CI | |
steps: | |
- name: Check environment | |
env: | |
BRANCH: ${{ github.event.pull_request.base.ref }} | |
work_dir: "/Users/paddle/workspace" | |
PADDLE_ROOT: "/Users/paddle/workspace" | |
MACOSX_DEPLOYMENT_TARGET: 10.11 | |
export PADDLE_DEV_NAME: "paddlepaddle/paddle:dev" | |
PADDLE_VERSION: 0.0.0 | |
COVERALLS_UPLOAD: "OFF" | |
WITH_DEB: "OFF" | |
RUN_TEST: "OFF" | |
WITH_DISTRIBUTE: "ON" | |
WITH_FLUID_ONLY: "ON" | |
WITH_TESTING: "ON" | |
WITH_INFERENCE_API_TEST: "OFF" | |
INSTALL_PREFIX: "/Users/paddle/CI_install_path" | |
WITH_TESTING: "ON" | |
PYTHON_ABI: "cp39-cp39" | |
PY_VERSION: 3.9 | |
WITH_AVX: "OFF" | |
WITH_ARM: "ON" | |
PROC_RUN: 8 | |
WITH_CACHE: "ON" | |
NIGHTLY_MODE: "OFF" | |
GIT_PR_ID: ${{ github.event.pull_request.number }} | |
PRECISION_TEST: "OFF" | |
CI_SKIP_CPP_TEST: "OFF" | |
WITH_ONNXRUNTIME: "OFF" | |
WITH_TENSORRT: "OFF" | |
GENERATOR: "Ninja" | |
WITH_SHARED_PHI: "ON" | |
run: | | |
[ -d "${work_dir}/Paddle" ] && rm -rf ${work_dir}/Paddle | |
[ -d "${work_dir}/Paddle.tar.gz" ] && rm -rf ${work_dir}/Paddle.tar.gz | |
wget -q --no-proxy https://paddle-github-action.bj.bcebos.com/PR/Paddle/${PR_ID}/${COMMIT_ID}/Paddle.tar.gz --no-check-certificate | |
tar xf Paddle.tar.gz --strip-components=1 | |
git config --global user.name "PaddleCI" | |
git config --global user.email "paddle_ci@example.com" | |
git remote add upstream https://github.com/PaddlePaddle/Paddle.git | |
. ../../../proxy | |
git checkout $BRANCH | |
git pull upstream $BRANCH | |
git fetch upstream $BRANCH | |
git checkout test | |
git merge --no-edit $BRANCH | |
- name: Build with mac python3.9 | |
run: | | |
bash ${work_dir}/Paddle/ci/run_setup.sh ${PYTHON_ABI:-""} bdist_wheel ${parallel_number:-""} | |
EXCODE=$? | |
exit $EXCODE | |
- name: Test with mac python3.9 | |
bash ${work_dir}/Paddle/ci/run_mac_test.sh ${PYTHON_ABI:-""} ${PROC_RUN:-""} | |
EXCODE=$? | |
exit $EXCODE |