@@ -83,16 +83,38 @@ jobs:
83
83
echo "Terminating Submitted AWS Batch Job: "${{ env.Batch_JobID }}""
84
84
aws batch terminate-job --job-id "${{ env.Batch_JobID }}" --reason "Job terminated by cancelled workflow"
85
85
86
+ build_paddle :
87
+ name : Build Paddle
88
+ if : " github.repository == 'd2l-ai/d2l-zh' && !contains(github.event.head_commit.message, '[skip paddle]') && !contains(github.event.head_commit.message, '[skip frameworks]')"
89
+ runs-on : ubuntu-latest
90
+ steps :
91
+ - name : Checkout repository
92
+ uses : actions/checkout@v3
93
+ - name : Setup Env Vars
94
+ uses : ./.github/actions/setup_env_vars
95
+ - name : Evaluate Paddle on AWS Batch
96
+ uses : ./.github/actions/submit-job
97
+ with :
98
+ job-type : ci-gpu-paddle
99
+ job-name : D2L-Build-Paddle
100
+ command : chmod +x ./.github/workflow_scripts/build_paddle.sh && ./.github/workflow_scripts/build_paddle.sh "${{ env.REPO_NAME }}" "${{ env.TARGET_BRANCH }}" "${{ env.CACHE_DIR }}"
101
+ - name : Terminate Batch Job on Cancellation
102
+ if : ${{ cancelled() && env.Batch_JobID }}
103
+ run : |
104
+ echo "Terminating Submitted AWS Batch Job: "${{ env.Batch_JobID }}""
105
+ aws batch terminate-job --job-id "${{ env.Batch_JobID }}" --reason "Job terminated by cancelled workflow"
106
+
86
107
build_and_deploy :
87
108
name : Build Website/PDF & Publish
88
- needs : [build_torch, build_tf, build_mxnet]
109
+ needs : [build_torch, build_tf, build_mxnet, build_paddle ]
89
110
if : |
90
111
always() &&
91
112
github.repository == 'd2l-ai/d2l-zh' &&
92
113
!contains(github.event.head_commit.message, '[skip builder]') &&
93
114
(needs.build_torch.result == 'success' || needs.build_torch.result == 'skipped') &&
94
115
(needs.build_tf.result == 'success' || needs.build_tf.result == 'skipped') &&
95
- (needs.build_mxnet.result == 'success' || needs.build_mxnet.result == 'skipped')
116
+ (needs.build_mxnet.result == 'success' || needs.build_mxnet.result == 'skipped') &&
117
+ (needs.build_paddle.result == 'success' || needs.build_paddle.result == 'skipped')
96
118
runs-on : ubuntu-latest
97
119
steps :
98
120
- name : Checkout repository
0 commit comments