Skip to content

Commit 44a7cff

Browse files
authored
Fix/ci (#127)
* runs-on ubuntu-22.04.4 * simplify github action for testing * rollback run on ubuntu-latest * build precompile before test-go * print shared libraries * build rust * fix print * check after cp * do not delete * build rust before go setup * remmove unused link_system * comment out build-rust * do precompile * move cache location * disable golang cache * remove test cache * remove cache * change shared library path * test wrong name * update go version to 1.23 * build go before test * clean cache before build * copy shared library before running test * add comments
1 parent 8462f81 commit 44a7cff

File tree

7 files changed

+20
-24
lines changed

7 files changed

+20
-24
lines changed

Diff for: .github/workflows/test.yml

+14-11
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ jobs:
3333
sudo rm -rf /opt/ghc
3434
sudo rm -rf "/usr/local/share/boost"
3535
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
36-
- name: Install latest rust
37-
uses: actions-rs/toolchain@v1
38-
with:
39-
toolchain: 1.77.1
40-
- uses: actions/setup-go@v4
41-
with:
42-
go-version: "1.22"
4336
- uses: actions/cache@v3
4437
with:
4538
path: |
@@ -48,12 +41,22 @@ jobs:
4841
~/.cargo/registry/cache/
4942
~/.cargo/git/db/
5043
target/
51-
crates/move-test/build/
5244
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
5345
restore-keys: ${{ runner.os }}-cargo-
54-
- name: Build
55-
run: |
56-
make build-rust
46+
- name: Install latest rust
47+
uses: actions-rs/toolchain@v1
48+
with:
49+
toolchain: 1.77.1
50+
- name: Build Rust
51+
run: make build-rust
52+
- uses: actions/setup-go@v4
53+
with:
54+
go-version: "1.22"
5755
- name: Test
5856
run: |
57+
# TODO - If we do not run "make build-linux", golang succeeds to find the shared libraries.
58+
# However, if we run "make build-linux", golang fails to find the shared libraries because
59+
# it tries to find libmovevm.so and libcompiler.so which is not present.
60+
cp api/libmovevm.x86_64.so api/libmovevm.so
61+
cp api/libcompiler.x86_64.so api/libcompiler.so
5962
make test

Diff for: Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ build-rust-debug:
113113
build-rust-release:
114114
cargo build -p movevm --release
115115
cargo build -p compiler --release
116-
rm -f api/$(SHARED_LIB_DST)
117-
rm -f api/$(COMPILER_SHARED_LIB_DST)
116+
118117
cp -fp target/release/$(SHARED_LIB_SRC) api/$(SHARED_LIB_DST)
119118
cp -fp target/release/$(COMPILER_SHARED_LIB_SRC) api/$(COMPILER_SHARED_LIB_DST)
119+
120120
make update-bindings
121-
@ #this pulls out ELF symbols, 80% size reduction!
122121

123122
clean:
124123
cargo clean

Diff for: api/link_linux_glibc_aarch64.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build linux && !muslc && arm64 && !sys_movevm
1+
//go:build linux && !muslc && arm64
22

33
package api
44

Diff for: api/link_linux_glibc_x86_64.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build linux && !muslc && amd64 && !sys_movevm
1+
//go:build linux && !muslc && amd64
22

33
package api
44

Diff for: api/link_macos.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build darwin && !sys_movevm
1+
//go:build darwin
22

33
package api
44

Diff for: api/link_muslc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build linux && muslc && !sys_movevm
1+
//go:build linux && muslc
22

33
package api
44

Diff for: api/link_system.go

-6
This file was deleted.

0 commit comments

Comments
 (0)