diff options
author | FxQnLr <[email protected]> | 2023-10-15 17:51:08 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-15 17:51:08 +0200 |
commit | e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b (patch) | |
tree | 4d7a2e553c0ea67f7aa3c63d788d76d714479fd1 /.github/workflows/test.yml | |
parent | b0e8aabfb9ea0f4c40a2aa330dd59f07b6c91216 (diff) | |
parent | abd4fbbf0ebd0385f68507eb20f9385db1b96793 (diff) | |
download | webol-e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b.tar webol-e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b.tar.gz webol-e0be33fc23d210dbd630a1bed2fe0ecb2ea6ce0b.zip |
Merge pull request #2 from FxQnLr/test
Get working actions and build into main
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r-- | .github/workflows/test.yml | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1bfdf7..90a5fea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -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,10 @@ 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 | push: true | 54 | push: true |
55 | platforms: linux/amd64,linux/arm64 | ||
56 | cache-from: type=gha | ||
57 | cache-to: type=gha,mode=max | ||
55 | tags: | | 58 | tags: | |
56 | ghcr.io/fxqnlr/webol:dev-latest | 59 | ghcr.io/fxqnlr/webol:dev-latest |
57 | ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} \ No newline at end of file | 60 | ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} |