Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 684468f

Browse files
Update kuksa_databroker_build.yml
1 parent 1c9de12 commit 684468f

File tree

1 file changed

+66
-64
lines changed

1 file changed

+66
-64
lines changed

.github/workflows/kuksa_databroker_build.yml

Lines changed: 66 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -27,49 +27,49 @@ on:
2727

2828

2929
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;
7373
7474
# - name: Publish test results as PR comment
7575
# uses: EnricoMi/publish-unit-test-result-action@v1
@@ -79,21 +79,21 @@ jobs:
7979
# github_token: ${{ secrets.GITHUB_TOKEN }}
8080
# files: results.xml
8181

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
8787

88-
# - name: Run code coverage
89-
# run: |
90-
# cargo tarpaulin -o Xml
88+
- name: Run code coverage
89+
run: |
90+
cargo tarpaulin -o Xml
9191
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
9797

9898
# - name: Publish coverage report as comment
9999
# uses: 5monkeys/cobertura-action@v12
@@ -108,8 +108,10 @@ jobs:
108108
uses: ./.github/workflows/check_push_rights.yml
109109
secrets: inherit
110110

111+
# Run on selfhosted, becasue our runner has native ARM build in a remote
112+
# builder (no need for qemu
111113
build-container:
112-
runs-on: [ ubuntu-latest ]
114+
runs-on: [ self-hosted ]
113115
needs: checkrights
114116

115117
steps:
@@ -132,13 +134,13 @@ jobs:
132134
type=semver,pattern={{major}}.{{minor}}
133135
type=semver,pattern={{major}}
134136
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
138140

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
142144

143145
- name: Log in to the Container registry
144146
if: needs.checkrights.outputs.have_secrets == 'true'
@@ -155,7 +157,7 @@ jobs:
155157
with:
156158
platforms: |
157159
linux/amd64
158-
# linux/arm64
160+
linux/arm64
159161
file: ./kuksa_databroker/Dockerfile
160162
context: .
161163
push: true

0 commit comments

Comments
 (0)