forked from PlummersSoftwareLLC/NightDriverStrip
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (49 loc) · 1.84 KB
/
CI.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
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
collect-environments:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Find environments
id: envs
run: |
if [[ $(< config/ci_exclude.json) != '[]' ]]; then echo "::warning title=Some environments were skipped::Environments not built: $(< config/ci_exclude.json)"; fi
echo "envs=$(tools/show_envs.py | jq -c --argfile ex config/ci_exclude.json '. - $ex')" >> $GITHUB_OUTPUT
outputs:
envs: ${{ steps.envs.outputs.envs }}
build-environment:
runs-on: ubuntu-latest
needs: [collect-environments]
strategy:
fail-fast: false
matrix:
envname: ${{ fromJson(needs.collect-environments.outputs.envs) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO
run: |
curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -o get-platformio.py
python get-platformio.py
echo "/home/runner/.platformio/penv/bin" >> $GITHUB_PATH
- name: Copy secrets and clear SSID
run: |
grep -v "^#define cszSSID" include/secrets.example.h > include/secrets.h
echo '#define cszSSID ""' >> include/secrets.h
- name: "Build environment: ${{ matrix.envname }}"
run: pio run -e ${{ matrix.envname }}
call-web-installer:
if: ( github.repository_owner == 'rbergen' && github.ref == 'refs/heads/staging' )
needs: [build-environment]
uses: ./.github/workflows/web_installer.yml
with:
release-name: ${{ github.ref_name }} commit ${{ github.sha }}
secrets: inherit