diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/test.yml | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b098de..c1bfdf7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -12,12 +12,11 @@ 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 | ||
15 | 16 | ||
16 | jobs: | 17 | jobs: |
17 | build: | 18 | build: |
18 | |||
19 | runs-on: ubuntu-latest | 19 | runs-on: ubuntu-latest |
20 | |||
21 | steps: | 20 | steps: |
22 | - name: Run sccache-cache | 21 | - name: Run sccache-cache |
23 | uses: mozilla-actions/[email protected] | 22 | uses: mozilla-actions/[email protected] |
@@ -26,20 +25,33 @@ jobs: | |||
26 | - uses: actions-rs/toolchain@v1 | 25 | - uses: actions-rs/toolchain@v1 |
27 | with: | 26 | with: |
28 | toolchain: stable | 27 | toolchain: stable |
28 | target: armv7-unknown-linux-gnueabihf | ||
29 | components: rustfmt, clippy | 29 | components: rustfmt, clippy |
30 | override: true | 30 | override: true |
31 | 31 | ||
32 | - name: Run cargo test | 32 | - name: Install arm linker |
33 | uses: actions-rs/cargo@v1 | 33 | run: sudo apt update && sudo apt install gcc-arm-linux-gnueabihf -y |
34 | with: | ||
35 | command: test | ||
36 | 34 | ||
37 | - name: Run cargo check | 35 | - name: Cargo build |
38 | uses: actions-rs/cargo@v1 | 36 | uses: actions-rs/cargo@v1 |
39 | with: | 37 | with: |
40 | command: check | 38 | command: build |
39 | args: --release --target armv7-unknown-linux-gnueabihf | ||
41 | 40 | ||
42 | - name: Run cargo clippy | 41 | - name: Set up Docker Buildx |
43 | uses: actions-rs/cargo@v1 | 42 | uses: docker/setup-buildx-action@v2 |
43 | - name: Login to DockerHub | ||
44 | uses: docker/login-action@v2 | ||
45 | with: | ||
46 | registry: ghcr.io | ||
47 | username: ${{ github.actor }} | ||
48 | password: ${{ secrets.GITHUB_TOKEN }} | ||
49 | - name: Build and push | ||
50 | id: docker_build | ||
51 | uses: docker/build-push-action@v3 | ||
44 | with: | 52 | with: |
45 | command: clippy | 53 | file: Dockerfile |
54 | push: true | ||
55 | tags: | | ||
56 | ghcr.io/fxqnlr/webol:dev-latest | ||
57 | ghcr.io/fxqnlr/webol:dev-${{ github.run_number }} \ No newline at end of file | ||