Skip to content

Commit 2b1b122

Browse files
committed
refactor: go back to Go
BREAKING CHANGE: rip Rust
1 parent d01c6e3 commit 2b1b122

27 files changed

+357
-198
lines changed

.github/workflows/push.yml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,18 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout repository
11-
uses: actions/checkout@v1
12-
- name: Install Rust
13-
uses: actions-rs/toolchain@v1
11+
uses: actions/checkout@v2
12+
- name: Setup Go
13+
uses: actions/setup-go@v2
1414
with:
15-
toolchain: stable
16-
override: true
17-
target: x86_64-unknown-linux-musl
18-
- run: cargo build --release --verbose
15+
go-version: '1.16'
16+
- name: Run build
17+
run: bash build-static.sh
1918
- name: upload artifact of build output
2019
uses: actions/upload-artifact@v2
2120
with:
2221
name: build
23-
path: target/release/agent
24-
25-
test:
26-
name: test
27-
runs-on: ubuntu-latest
28-
steps:
29-
- name: Checkout repository
30-
uses: actions/checkout@v1
31-
- name: Install Rust
32-
uses: actions-rs/toolchain@v1
33-
with:
34-
toolchain: stable
35-
override: true
36-
profile: minimal
37-
- run: cargo test --verbose
38-
39-
rustfmt:
40-
name: rustfmt
41-
runs-on: ubuntu-latest
42-
steps:
43-
- name: Checkout repository
44-
uses: actions/checkout@v1
45-
- name: Install Rust
46-
uses: actions-rs/toolchain@v1
47-
with:
48-
toolchain: stable
49-
override: true
50-
profile: minimal
51-
components: rustfmt
52-
- name: Check formatting
53-
run: cargo fmt -- --check
22+
path: agent
5423

5524
commitlint:
5625
runs-on: ubuntu-latest
@@ -64,7 +33,7 @@ jobs:
6433

6534
release:
6635
name: Publish new release
67-
needs: [build, test, rustfmt, commitlint]
36+
needs: [build, commitlint]
6837
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
6938
runs-on: ubuntu-latest
7039
steps:

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ To build the filesystem of the agent VM, see details in https://github.com/codeb
55
## Build
66

77
```sh
8-
cargo build
8+
go build
99
```
1010

11-
With musl (for Alpine Linux):
11+
Static (for Alpine Linux):
1212

1313
```sh
14-
rustup target add x86_64-unknown-linux-musl
15-
cargo build --target x86_64-unknown-linux-musl
14+
go build -tags netgo -ldflags '-extldflags "-static"'
1615
```
1716

1817
## Run
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)