-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (95 loc) · 3.23 KB
/
layer.yml
File metadata and controls
99 lines (95 loc) · 3.23 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
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
name: layer
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
skip:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.filter.outputs.should_skip }}
steps:
- uses: actions/checkout@v6
with:
filter: blob:none
fetch-depth: 0
- uses: leavesster/pull-request-path-filter@v0.2
id: "filter"
with:
paths: |
- "**"
- "!**.md"
- "!.github/workflows/**"
- ".github/workflows/pr.yml"
- ".vscode"
- ".gitignore"
check:
runs-on: ubuntu-latest
needs: skip
if: ${{ needs.skip.outputs.should_skip != 'true' }}
env:
OVMLAYER_REPOSITORY: ${{ vars.OVMLAYER_REPOSITORY || 'ovmlayer-next' }}
OVMLAYER_USE_RUNTIME_SETUP: "true"
steps:
- uses: actions/checkout@v6
- uses: pdm-project/setup-pdm@v4
with:
cache: true
python-version: "3.10"
- name: install dependencies
run: pdm install
- name: build
run: pdm build
- name: static check
run: pdm check
- name: install mqtt broker
run: |
sudo apt-add-repository -y ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install -y mosquitto
- name: Generate GitHub App Token for oomol/${{ env.OVMLAYER_REPOSITORY }}
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.OOMOL_DOWNLOADER_APP_ID }}
private-key: ${{ secrets.OOMOL_DOWNLOADER_APP_PRIVATE_KEY }}
owner: oomol
repositories: ${{ env.OVMLAYER_REPOSITORY }}
- uses: oomol/oocana-rust/.github/actions/ovmlayer@main
with:
repository: ${{ env.OVMLAYER_REPOSITORY }}
rootfs: https://github.com/oomol/ovmlayer-rootfs/releases/download/base-rootfs%400.4.0/amd64-rootfs.tar
token: ${{ steps.app-token.outputs.token }}
use-runtime-setup: ${{ env.OVMLAYER_USE_RUNTIME_SETUP }}
- name: modify overlayfs # https://github.com/oomol/ovmlayer/issues/25
run: |
sudo bash -c 'echo N > /sys/module/overlay/parameters/redirect_always_follow'
sudo bash -c 'echo N > /sys/module/overlay/parameters/redirect_dir'
sudo bash -c 'echo N > /sys/module/overlay/parameters/xino_auto'
sudo bash -c 'echo N > /sys/module/overlay/parameters/metacopy'
sudo bash -c 'echo N > /sys/module/overlay/parameters/check_copy_up'
sudo bash -c 'echo N > /sys/module/overlay/parameters/index'
- name: add executor to rootfs layers
run: |
python ./scripts/layer.py
- name: unittest
run: |
mosquitto -p 47688 -d
pdm test
- uses: actions/setup-node@v6
- name: test flow examples
timeout-minutes: 5
run: |
mosquitto -p 47688 -d
source .venv/bin/activate
cd flow-examples
npm install
npm run test
- name: upload logs
uses: actions/upload-artifact@v6
with:
name: oocana-logs
path: ~/.oocana/sessions/
retention-days: 1
if: failure()