File tree 15 files changed +84
-19
lines changed
15 files changed +84
-19
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ jobs:
14
14
- uses : actions/checkout@v3
15
15
with :
16
16
submodules : true
17
- -
18
- name : Set up QEMU
19
- uses : docker/setup-qemu-action@v2
20
- with :
21
- platforms : arm64
17
+ # -
18
+ # name: Set up QEMU
19
+ # uses: docker/setup-qemu-action@v2
20
+ # with:
21
+ # platforms: arm64
22
22
23
23
-
24
24
name : Set up Docker Buildx
35
35
uses : docker/build-push-action@v2
36
36
with :
37
37
context : .
38
- platforms : linux/amd64,linux/arm64
38
+ # platforms: linux/amd64,linux/arm64
39
39
push : true
40
40
file : command/docker/client/client.Dockerfile
41
41
cache-from : type=gha
Original file line number Diff line number Diff line change 1
1
name : fornet arm64 client build
2
2
# run at self-hosted mac min M2
3
+ # But it does not success for SSL timeout. we may try other methods to do this
3
4
on :
4
5
workflow_dispatch :
5
6
inputs :
35
36
file : command/docker/client/client.Dockerfile
36
37
cache-from : type=gha
37
38
cache-to : type=gha,mode=max
38
- tags : ${{ env.REGISTRY }}/fornetcode/fornet:${{github.event.inputs.version}}, ${{ env.REGISTRY }}/fornetcode/fornet:latest
39
+ tags : ${{ env.REGISTRY }}/fornetcode/fornet:${{github.event.inputs.version}}
39
40
- name : copy binary from docker to release directory
40
41
run : |
41
42
mkdir -p release
Original file line number Diff line number Diff line change
1
+ name : fornet arm64 client build
2
+ # run at self-hosted mac min M2
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ version :
7
+ required : true
8
+ description : " version to release"
9
+ env :
10
+ REGISTRY : ghcr.io
11
+ jobs :
12
+ mac_arm64 :
13
+ strategy :
14
+ max-parallel : 1
15
+ fail-fast : true
16
+ matrix :
17
+ settings :
18
+ - host : self-hosted
19
+ target : aarch64-apple-darwin
20
+ build : make release-mac-aarch64
21
+
22
+ runs-on : ${{ matrix.settings.host }}
23
+ steps :
24
+ - uses : actions/checkout@v3
25
+ with :
26
+ submodules : true
27
+ - name : Install Rust
28
+ uses : actions-rs/toolchain@v1
29
+ with :
30
+ toolchain : stable
31
+ target : ${{ matrix.settings.target }}
32
+ profile : minimal
33
+ - name : Set up cargo cache
34
+ uses : actions/cache@v3
35
+ continue-on-error : false
36
+ with :
37
+ path : |
38
+ ~/.cargo/bin/
39
+ ~/.cargo/registry/index/
40
+ ~/.cargo/registry/cache/
41
+ ~/.cargo/git/db/
42
+ client/target/
43
+ key : ${{ matrix.settings.host }}-${{ matrix.settings.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
44
+ restore-keys : ${{ matrix.settings.host }}-cargo-${{ matrix.settings.target }}
45
+ # - name: Setup tmate session
46
+ # uses: mxschmitt/action-tmate@v3
47
+ - name : Build
48
+ run : ${{ matrix.settings.build }}
49
+
50
+ - name : Upload artifact
51
+ uses : actions/upload-artifact@v2
52
+ with :
53
+ path : release/*
54
+ if-no-files-found : error
Original file line number Diff line number Diff line change 13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- uses : actions/checkout@v3
16
+ with :
17
+ submodules : true
18
+
16
19
- uses : coursier/cache-action@v6
17
20
- uses : coursier/setup-action@v1
18
21
with :
44
47
cache-from : type=gha
45
48
cache-to : type=gha,mode=max
46
49
tags : ${{ env.REGISTRY }}/fornetcode/fornet-backend:${{github.event.inputs.version}}
50
+ - name : Upload jar to artifact
51
+ uses : actions/upload-artifact@v2
52
+ with :
53
+ path : release/*
54
+ if-no-files-found : error
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ release-mac-x86_64:
16
16
otool -L client/target/x86_64-apple-darwin/release/fornet-cli
17
17
tar -C client/target/x86_64-apple-darwin/release/ -czvf release/fornet-mac-x86_64.tar.gz ./fornet ./fornet-cli
18
18
19
+ # brew install cmake wget
19
20
release-mac-aarch64 :
20
21
mkdir protoc && cd protoc && wget https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-osx-aarch_64.zip && unzip protoc-21.9-osx-aarch_64.zip && sudo cp bin/protoc /usr/local/bin
21
22
cp -r protoc/include/* protobuf/
@@ -51,4 +52,6 @@ release-backend:
51
52
cd admin-web && npm ci && npm run build:prod && cd ../
52
53
cp -r admin-web/build/ command/docker/backend/web
53
54
cd backend && sbt universal:packageBin && cd ../
55
+ mkdir release
56
+ cp backend/target/universal/app-* .zip release/
54
57
cp backend/target/universal/app-* .zip command/docker/backend/app.zip && cd command/docker/backend && unzip app.zip && rm app.zip && mv app-* app
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " admin-web" ,
3
- "version" : " 0.0.3 " ,
3
+ "version" : " 0.0.4 " ,
4
4
"private" : true ,
5
5
"dependencies" : {
6
6
"@reduxjs/toolkit" : " ^1.8.6" ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ lazy val webSugar = RootProject(file("../third/web-sugar"))
21
21
lazy val app = project
22
22
.in(file(" ." ))
23
23
.settings(
24
- version := " 0.0.3 " ,
24
+ version := " 0.0.4 " ,
25
25
scalaVersion := scala3Version,
26
26
libraryDependencies ++=
27
27
Seq (
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " fornet"
3
- version = " 0.0.3 "
3
+ version = " 0.0.4 "
4
4
edition = " 2021"
5
5
6
6
[[bin ]]
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " fornet-lib"
3
- version = " 0.0.3 "
3
+ version = " 0.0.4 "
4
4
edition = " 2021"
5
5
6
6
# For test
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: "3"
3
3
services :
4
4
5
5
mqtt :
6
- image : rmqtt/rmqtt:0.2.11
6
+ image : rmqtt/rmqtt:latest
7
7
container_name : mqtt
8
8
ports :
9
9
- 1883:1883
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ ARG BASE_IMAGE=rust:1.65
9
9
# ARG RUNTIME_IMAGE=alpine
10
10
ARG RUNTIME_IMAGE=rust:1.65
11
11
12
- FROM --platform=$BUILDPLATFORM ${BASE_IMAGE} AS builder
12
+ FROM ${BASE_IMAGE} AS builder
13
13
14
14
RUN apt update && apt install -y cmake bash
15
15
@@ -20,19 +20,18 @@ RUN apt update && apt install -y cmake bash
20
20
ADD protobuf /source/protobuf
21
21
ADD third /source/third
22
22
ADD client /source/client
23
- ADD win-tun-driver /source/win-tun-driver
24
23
ADD command/docker/client/script.sh /script.sh
25
24
RUN chmod +x /script.sh && /script.sh
26
25
# RUN ls -al && cd protobuf && ls -al && cd ../
27
26
28
27
RUN --mount=type=cache,target=/usr/local/cargo/registry \
29
28
cd /source/client && cargo build --release
30
29
31
- FROM --platform=$BUILDPLATFORM ${RUNTIME_IMAGE}
30
+ FROM ${RUNTIME_IMAGE}
32
31
33
32
ENV FORNET_CONFIG=/config
34
33
35
- RUN mkdir /config && apt-get update && apt install -y iproute2
34
+ RUN mkdir /config && apt update && apt install -y iproute2
36
35
37
36
COPY --from=builder /source/client/target/release/fornet /usr/bin
38
37
COPY --from=builder /source/client/target/release/fornet-cli /usr/bin
Original file line number Diff line number Diff line change 2
2
3
3
# 1883(mqtt) 6060(http) 5363(grpc)
4
4
# docker rm -f mqtt
5
- docker run -d --name mqtt --network=host -v $( pwd) /log:/var/log/rmqtt -v $( pwd) /config/rmqtt.toml:/app/rmqtt/rmqtt.toml -v $( pwd) /config/plugin:/app/rmqtt/plugin rmqtt/rmqtt:0.2.11
5
+ docker run -d --name mqtt --network=host -v $( pwd) /log:/var/log/rmqtt -v $( pwd) /config/rmqtt.toml:/app/rmqtt/rmqtt.toml -v $( pwd) /config/plugin:/app/rmqtt/plugin rmqtt/rmqtt:latest
6
6
# docker logs -f --tail 50 mqtt
You can’t perform that action at this time.
0 commit comments