-
Notifications
You must be signed in to change notification settings - Fork 35
60 lines (50 loc) · 1.67 KB
/
build-init.yml
File metadata and controls
60 lines (50 loc) · 1.67 KB
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
---
name: CI-build
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore: ["docs/**"]
jobs:
build-init:
if: github.event.pull_request.draft == false
# this job tests ansible provisioning in Docker containers
# Tests on both ARM64 and AMD64 architectures using Ubuntu runners
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Install pip requirements
run: |
pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
- name: Install Ansible requirements
run: ansible-galaxy install -r requirements.yml
- name: Install Docker collection for CI
run: ansible-galaxy collection install community.docker
- name: Start Ubuntu Docker container
run: |
docker run -d --name quantum-mobile \
-v ${{ github.workspace }}:/workspace \
ubuntu:24.04 \
sleep infinity
- name: Prepare container for Ansible
run: docker exec quantum-mobile bash -c "apt-get update && apt-get install -y python3 sudo"
- name: Run Ansible provisioning
run: ansible-playbook -v --limit docker-ci -e build_hosts=docker-ci --skip-tags ci_skip playbook-build.yml
env:
ANSIBLE_CALLBACKS_ENABLED: ansible.posix.profile_tasks
- name: Archive ansible log
if: always()
uses: actions/upload-artifact@v7
with:
name: ansible-log-${{ matrix.os }}
path: ansible.log