27
27
28
28
29
29
jobs :
30
- # lint:
31
- # name: Lint
32
- # runs-on: ubuntu-latest
33
- #
34
- # steps:
35
- # - uses: actions/checkout@v3
36
- # - name: cargo fmt
37
- # working-directory: ${{github.workspace}}
38
- # run: cargo fmt -- --check
39
- # - name: cargo clippy
40
- # working-directory: ${{github.workspace}}
41
- # run: cargo clippy --all-targets -- -W warnings -D warnings
42
-
43
- # test:
44
- # name: Test
45
- # runs-on: ubuntu-latest
46
-
47
- # steps:
48
- # - uses: actions/checkout@v3
49
- # - uses: actions-rs/[email protected]
50
- # with:
51
- # crate: cargo-tarpaulin
52
- # version: latest
53
-
54
- # - uses: actions-rs/[email protected]
55
- # with:
56
- # crate: cross
57
- # version: latest
58
-
59
- # - uses: actions-rs/[email protected]
60
- # with:
61
- # crate: cargo-strip
62
- # version: latest
63
-
64
- # - uses: actions-rs/[email protected]
65
- # with:
66
- # crate: cargo2junit
67
- # version: latest
68
-
69
- # - name: Run Tests
70
- # working-directory: ${{github.workspace}}
71
- # run: |
72
- # cargo test --all-targets -- -Z unstable-options --report-time --format json | cargo2junit > results.xml;
30
+ lint :
31
+ name : Lint
32
+ runs-on : ubuntu-latest
33
+
34
+ steps :
35
+ - uses : actions/checkout@v3
36
+ - name : cargo fmt
37
+ working-directory : ${{github.workspace}}
38
+ run : cargo fmt -- --check
39
+ - name : cargo clippy
40
+ working-directory : ${{github.workspace}}
41
+ run : cargo clippy --all-targets -- -W warnings -D warnings
42
+
43
+ test :
44
+ name : Test
45
+ runs-on : ubuntu-latest
46
+
47
+ steps :
48
+ - uses : actions/checkout@v3
49
+ -
uses :
actions-rs/[email protected]
50
+ with :
51
+ crate : cargo-tarpaulin
52
+ version : latest
53
+
54
+ -
uses :
actions-rs/[email protected]
55
+ with :
56
+ crate : cross
57
+ version : latest
58
+
59
+ -
uses :
actions-rs/[email protected]
60
+ with :
61
+ crate : cargo-strip
62
+ version : latest
63
+
64
+ -
uses :
actions-rs/[email protected]
65
+ with :
66
+ crate : cargo2junit
67
+ version : latest
68
+
69
+ - name : Run Tests
70
+ working-directory : ${{github.workspace}}
71
+ run : |
72
+ cargo test --all-targets -- -Z unstable-options --report-time --format json | cargo2junit > results.xml;
73
73
74
74
# - name: Publish test results as PR comment
75
75
# uses: EnricoMi/publish-unit-test-result-action@v1
@@ -79,21 +79,21 @@ jobs:
79
79
# github_token: ${{ secrets.GITHUB_TOKEN }}
80
80
# files: results.xml
81
81
82
- # - name: Upload testing report
83
- # uses: actions/upload-artifact@v3
84
- # with:
85
- # name: Unit test results
86
- # path: results.xml
82
+ - name : Upload testing report
83
+ uses : actions/upload-artifact@v3
84
+ with :
85
+ name : Unit test results
86
+ path : results.xml
87
87
88
- # - name: Run code coverage
89
- # run: |
90
- # cargo tarpaulin -o Xml
88
+ - name : Run code coverage
89
+ run : |
90
+ cargo tarpaulin -o Xml
91
91
92
- # - name: Upload coverage report
93
- # uses: actions/upload-artifact@v3
94
- # with:
95
- # name: Code coverage report
96
- # path: cobertura.xml
92
+ - name : Upload coverage report
93
+ uses : actions/upload-artifact@v3
94
+ with :
95
+ name : Code coverage report
96
+ path : cobertura.xml
97
97
98
98
# - name: Publish coverage report as comment
99
99
# uses: 5monkeys/cobertura-action@v12
@@ -108,8 +108,10 @@ jobs:
108
108
uses : ./.github/workflows/check_push_rights.yml
109
109
secrets : inherit
110
110
111
+ # Run on selfhosted, becasue our runner has native ARM build in a remote
112
+ # builder (no need for qemu
111
113
build-container :
112
- runs-on : [ ubuntu-latest ]
114
+ runs-on : [ self-hosted ]
113
115
needs : checkrights
114
116
115
117
steps :
@@ -132,13 +134,13 @@ jobs:
132
134
type=semver,pattern={{major}}.{{minor}}
133
135
type=semver,pattern={{major}}
134
136
135
- # only needed for runners without buildx setup, will be slow
136
- - name : Set up QEMU
137
- uses : docker/setup-qemu-action@v2
137
+ # only needed for runners without buildx setup, will be slow
138
+ # - name: Set up QEMU
139
+ # uses: docker/setup-qemu-action@v2
138
140
139
- - name : Set up Docker Buildx
140
- id : buildx
141
- uses : docker/setup-buildx-action@v2
141
+ # - name: Set up Docker Buildx
142
+ # id: buildx
143
+ # uses: docker/setup-buildx-action@v2
142
144
143
145
- name : Log in to the Container registry
144
146
if : needs.checkrights.outputs.have_secrets == 'true'
@@ -155,7 +157,7 @@ jobs:
155
157
with :
156
158
platforms : |
157
159
linux/amd64
158
- # linux/arm64
160
+ linux/arm64
159
161
file : ./kuksa_databroker/Dockerfile
160
162
context : .
161
163
push : true
0 commit comments