Skip to content

Commit 324b061

Browse files
ci: adding Rust compiling (#15)
1 parent a76b9d6 commit 324b061

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ jobs:
3333
uses: actions/checkout@v3
3434
- name: Check linting.
3535
run: earthly --ci +check-${{ matrix.language }}-linting
36+
compile:
37+
name: Compile
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Download Earthly v0.8.12.
41+
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.12/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
42+
- name: Checkout code.
43+
uses: actions/checkout@v3
44+
- name: Compile.
45+
run: earthly --ci +compile

Earthfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,11 @@ check-linting:
130130
BUILD +check-rust-linting
131131
BUILD +check-shell-linting
132132
BUILD +check-github-actions-workflows-linting
133+
134+
135+
compile:
136+
FROM +rust-base
137+
DO +COPY_SOURCECODE
138+
RUN ./ci/compile.sh
139+
SAVE ARTIFACT "target/" AS LOCAL "./"
140+
SAVE ARTIFACT "Cargo.lock" AS LOCAL "./"

ci/compile.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
3+
set -o errexit
4+
set -o xtrace
5+
6+
cargo build --verbose --workspace
7+
cargo build --verbose --workspace --all-features
8+
cargo build --verbose --workspace --no-default-features

0 commit comments

Comments
 (0)