-
Notifications
You must be signed in to change notification settings - Fork 299
/
azure-pipelines.yml
81 lines (78 loc) · 2.88 KB
/
azure-pipelines.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
# yamllint disable rule:line-length
---
pool:
vmImage: 'ubuntu-20.04'
stages:
- stage: Build
jobs:
- job: stm32l496_discovery_gcc_make
container: akospasztor/docker-gcc-arm:8-2019-q3-linux-1.0.1
steps:
- script: cd projects/STM32L496-Discovery/GCC/ && make
displayName: Build project with Make
- job: stm32l496_discovery_gcc_scons
container: akospasztor/docker-gcc-arm:8-2019-q3-linux-1.0.1
steps:
- script: pip install -r requirements.txt
displayName: Install python dependencies
- script: scons build --all -j8
displayName: Build project with SCons
- job: doxygen
container: akospasztor/docker-gcc-arm:8-2019-q3-linux-1.0.1
steps:
- script: doxygen docs/Doxyfile
displayName: Run doxygen
- script: cp -r --parents docs/img docs/html
displayName: Copy additional images to html folder
- publish: $(System.DefaultWorkingDirectory)/docs/html
artifact: doxygen-html
displayName: Upload artifact
- stage: Test
jobs:
- job: format_check
container: akospasztor/docker-gcc-arm:8-2019-q3-linux-1.0.1
steps:
- script: pip install -r requirements.txt
displayName: Install python dependencies
- script: pytest -s --executable=clang-format-11
displayName: Run pytest
- job: style_check
container: akospasztor/docker-gcc-arm:8-2019-q3-linux-1.0.1
steps:
- script: pip install -r requirements.txt
displayName: Install python dependencies
- script: ec
displayName: Run editorconfig-checker
- script: flake8
displayName: Run flake8
- script: yamllint .
displayName: Run yamllint
- stage: Deploy
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- job: github_pages
steps:
- checkout: none
- download: current
artifact: doxygen-html
- script: |
cp -r $(Pipeline.Workspace)/doxygen-html/* .
ls -al
displayName: Copy artifact contents
- script: |
git init
git config --local user.name "Akos Pasztor"
git config --local user.email "[email protected]"
displayName: Git setup
- script: |
if [ -z "$(git status --porcelain)" ]
then
echo "Nothing to commit."
exit 1
fi
displayName: Git check
- script: |
git add .
git commit -m 'Deploy to GitHub Pages'
git push --force https://akospasztor:$(gh_pat)@github.com/akospasztor/stm32-bootloader.git master:gh-pages
displayName: Git push