Skip to content

Commit a510c70

Browse files
committed
refactor: test tasks
1 parent c3eb663 commit a510c70

File tree

21 files changed

+19
-473
lines changed

21 files changed

+19
-473
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ steps:
2020
image: joseluisq/rust-linux-darwin-builder:latest
2121
pull: if-not-exists
2222
commands:
23-
- make test
23+
- make ci-test
2424

2525
trigger:
2626
event:

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ os:
77
- linux
88

99
script:
10-
- make test
10+
- make build
11+
- make test
1112

1213
notifications:
1314
email: false

Makefile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,32 @@ build:
55
.PHONY: build
66

77
test:
8+
@docker run --rm -it \
9+
-v $(PWD):/drone/src \
10+
-w /drone/src \
11+
joseluisq/rust-linux-darwin-builder:latest \
12+
make ci-test
13+
.PHONY: test
14+
15+
ci-test:
816
@sudo chown -R rust:rust ./
917
@echo "Testing application..."
1018
@rustc -vV
19+
@echo
1120
@echo "Compiling application(linux-musl x86_64)..."
12-
@cargo build --manifest-path=examples/hello-world/Cargo.toml --release --target x86_64-unknown-linux-musl
13-
@du -sh examples/hello-world/target/x86_64-unknown-linux-musl/release/helloworld
21+
@cargo build --manifest-path=tests/hello-world/Cargo.toml --release --target x86_64-unknown-linux-musl
22+
@du -sh tests/hello-world/target/x86_64-unknown-linux-musl/release/helloworld
1423
@echo
1524
@echo "Compiling application(apple-darwin x86_64)..."
16-
@cargo build --manifest-path=examples/hello-world/Cargo.toml --release --target x86_64-apple-darwin
17-
@du -sh examples/hello-world/target/x86_64-apple-darwin/release/helloworld
18-
.ONESHELL: test
25+
@cargo build --manifest-path=tests/hello-world/Cargo.toml --release --target x86_64-apple-darwin
26+
@du -sh tests/hello-world/target/x86_64-apple-darwin/release/helloworld
27+
.ONESHELL: ci-test
1928

2029
release:
21-
# 2. Update docker files to latest tag
30+
# 1. Update docker files to latest tag
2231
./docker/version.sh $(TAG)
2332

24-
# 3. Commit and push to latest tag
33+
# 2. Commit and push to latest tag
2534
git add docker/Dockerfile
2635
git commit docker/Dockerfile -m "$(TAG)"
2736
git tag $(TAG)

docker/image_test.sh

Lines changed: 0 additions & 60 deletions
This file was deleted.

examples/adding-a-library/.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/adding-a-library/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/build-release

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/linking-with-git2/.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/linking-with-git2/Cargo.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/linking-with-git2/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)