summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorfx <[email protected]>2023-10-14 23:14:09 +0200
committerfx <[email protected]>2023-10-14 23:14:09 +0200
commitd109f789b1cb75fc144a203628694dfb7ed300cb (patch)
treebbbc628adb93dbcc52cbc4e4b3a94395dbc8f8b3 /.github/workflows/test.yml
parent6648d1da1df9a4e4e2945739fc0fd3c7f77643cb (diff)
downloadwebol-d109f789b1cb75fc144a203628694dfb7ed300cb.tar
webol-d109f789b1cb75fc144a203628694dfb7ed300cb.tar.gz
webol-d109f789b1cb75fc144a203628694dfb7ed300cb.zip
test multiplatform build w/ actions
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml28
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
3on: 3on:
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
10env: 10env:
@@ -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
17jobs: 16jobs:
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 }}