diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/test.yml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf170f5..ed9fba6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -2,9 +2,9 @@ name: build | |||
2 | 2 | ||
3 | on: | 3 | on: |
4 | push: | 4 | push: |
5 | branches: [ "main" ] | 5 | branches: [ "main", "test" ] |
6 | pull_request: | 6 | pull_request: |
7 | branches: [ "main" ] | 7 | branches: [ "main", "test" ] |
8 | workflow_dispatch: | 8 | workflow_dispatch: |
9 | 9 | ||
10 | env: | 10 | env: |
@@ -12,7 +12,6 @@ env: | |||
12 | RUSTC_WRAPPER: "sccache" | 12 | RUSTC_WRAPPER: "sccache" |
13 | SQLX_OFFLINE: "true" | 13 | SQLX_OFFLINE: "true" |
14 | CARGO_TERM_COLOR: always | 14 | CARGO_TERM_COLOR: always |
15 | CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc | ||
16 | 15 | ||
17 | jobs: | 16 | jobs: |
18 | build: | 17 | build: |
@@ -21,23 +20,25 @@ jobs: | |||
21 | - name: Run sccache-cache | 20 | - name: Run sccache-cache |
22 | uses: mozilla-actions/[email protected] | 21 | uses: mozilla-actions/[email protected] |
23 | 22 | ||
24 | - uses: actions/checkout@v3 | 23 | - uses: actions/checkout@v4 |
25 | - uses: actions-rs/toolchain@v1 | 24 | - uses: actions-rs/toolchain@v1 |
26 | with: | 25 | with: |
27 | toolchain: stable | 26 | toolchain: stable |
28 | target: armv7-unknown-linux-gnueabihf | ||
29 | components: rustfmt, clippy | 27 | components: rustfmt, clippy |
30 | override: true | 28 | override: true |
31 | 29 | ||
32 | - name: Install arm linker | 30 | - name: Run cargo check |
33 | run: sudo apt update && sudo apt install gcc-arm-linux-gnueabihf -y | 31 | uses: actions-rs/cargo@v1 |
32 | with: | ||
33 | command: check | ||
34 | 34 | ||
35 | - name: Cargo build | 35 | - name: Run Clippy |
36 | uses: actions-rs/cargo@v1 | 36 | uses: actions-rs/cargo@v1 |
37 | with: | 37 | with: |
38 | command: build | 38 | command: clippy |
39 | args: --release --target armv7-unknown-linux-gnueabihf | ||
40 | 39 | ||
40 | - name: Set up QEMU | ||
41 | uses: docker/setup-qemu-action@v3 | ||
41 | - name: Set up Docker Buildx | 42 | - name: Set up Docker Buildx |
42 | uses: docker/setup-buildx-action@v2 | 43 | uses: docker/setup-buildx-action@v2 |
43 | - name: Login to DockerHub | 44 | - name: Login to DockerHub |
@@ -50,8 +51,9 @@ jobs: | |||
50 | id: docker_build | 51 | id: docker_build |
51 | uses: docker/build-push-action@v3 | 52 | uses: docker/build-push-action@v3 |
52 | with: | 53 | with: |
53 | file: Dockerfile | 54 | file: Dockerfile.build |
54 | push: true | 55 | push: true |
56 | platforms: linux/amd64,linux/arm/v7 | ||
55 | tags: | | 57 | tags: | |
56 | ghcr.io/fxqnlr/webol:dev-latest | 58 | ghcr.io/fxqnlr/webol:test-latest |
57 | ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} | 59 | ghcr.io/fxqnlr/webol:test-${{ github.run_number }} |