-
Notifications
You must be signed in to change notification settings - Fork 148
107 lines (94 loc) · 3.84 KB
/
concrete_compiler_test_cpu_distributed.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: concrete-compiler test linux-cpu-distributed
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/concrete_compiler_test_cpu_distributed.yml
- compilers/concrete-compiler/**
push:
branches:
- 'main'
- 'release/*'
env:
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
concurrency:
group: concrete_compiler_test_cpu_distributed_${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
setup-instance:
runs-on: ubuntu-latest
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@f26b8d611b2e695158fb0a6980834f0612f65ef8 # v1.4.0
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
backend: aws
profile: slurm-cluster
build-and-run-test:
# The distributed-ci runner is registered on the instance configured in the slurm-cluster profile.
# It's why we need to setup-instance
needs: setup-instance
runs-on: distributed-ci
steps:
- name: Instance cleanup
run: |
sudo rm -rf /home/ubuntu/actions-runner/_work/concrete/concrete
mkdir -p /home/ubuntu/actions-runner/_work/concrete/concrete
docker system prune -af
- name: Fetch repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: recursive
- name: Set up home
# "Install rust" step require root user to have a HOME directory which is not set.
run: |
echo "HOME=/shared" >> "${GITHUB_ENV}"
- name: Setup rust toolchain for concrete-cpu
uses: ./.github/actions/setup_rust_toolchain_for_concrete_cpu
- name: Build end-to-end distributed test
run: |
cd compilers/concrete-compiler/compiler
rm -rf /shared/build
make HPX_DIR=/shared/hpx install-hpx-from-source
make HPX_DIR=/shared/hpx BUILD_DIR=/shared/build CCACHE=ON DATAFLOW_EXECUTION_ENABLED=ON BINDINGS_PYTHON_ENABLED=OFF build-end-to-end-tests
- name: Run end-to-end distributed test
run: |
cd compilers/concrete-compiler/compiler
rm -rf /shared/KeyCache
make BUILD_DIR=/shared/build KEY_CACHE_DIRECTORY=/shared/KeyCache run-end-to-end-distributed-tests
- name: Slack Notification
if: ${{ failure() && github.ref == 'refs/heads/main' }}
continue-on-error: true
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "build-and-run-test finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})"
teardown-instance:
needs: [ setup-instance, build-and-run-test ]
if: ${{ always() && needs.setup-instance.result != 'skipped' }}
runs-on: ubuntu-latest
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@f26b8d611b2e695158fb0a6980834f0612f65ef8 # v1.4.0
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
label: distributed-ci
- name: Slack Notification
if: ${{ failure() }}
continue-on-error: true
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Instance teardown finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})"