diff options
author | fx <[email protected]> | 2023-10-09 21:52:06 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-10-09 21:52:06 +0200 |
commit | 5e83acf5bd2693421c9909554723d605b1247cad (patch) | |
tree | fc30af3b55d768ce4c58a4cde462d7dab8ef94c5 | |
parent | 26a0d3c3dd4ba65431149386fe15720054b1e361 (diff) | |
download | webol-5e83acf5bd2693421c9909554723d605b1247cad.tar webol-5e83acf5bd2693421c9909554723d605b1247cad.tar.gz webol-5e83acf5bd2693421c9909554723d605b1247cad.zip |
try arm comp and ghcr
-rw-r--r-- | .github/workflows/test.yml | 34 | ||||
-rw-r--r-- | Dockerfile | 7 |
2 files changed, 30 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 | ||
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..969403d --- /dev/null +++ b/Dockerfile | |||
@@ -0,0 +1,7 @@ | |||
1 | FROM --platform=amd64 debian:bullseye-slim | ||
2 | |||
3 | WORKDIR /usr/local/webol | ||
4 | COPY target/armv7-unknown-linux-gnueabihf/release/webol /usr/local/bin/webol | ||
5 | |||
6 | EXPOSE 72209 | ||
7 | CMD ["webol"] \ No newline at end of file | ||