-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add circe-ci config * run tickle on push for testing * add remote docker setup * add wasm-all-ci * add scripts to volume * commit lock file * Update WASM artifacts [skip ci] * try copy content of artifacts folder * remove all artifacts and re-run * Update WASM artifacts [skip ci] * add comments on tickle job * remove use of `just` and wasm modules as well * attempt to fix modules build * Update WASM artifacts for $GHA_Event [skip ci] * use pwd dirname for cp command * fix typo * add integrations and framework mounts * Update WASM artifacts for $GHA_Event [skip ci] * add debugging * remove container before mounting to ensure its fresh * restructure container mounting * print root dir * fix * cp to root of container * Update WASM artifacts for $GHA_Event [skip ci] * re-enable framework builds * allow manual trigger of wasm builds * update name of ci job * add coverage build for modules * formatting * do changes in modules dir * update coverage trigger * update equal statement * update url for coverage trigger * use gh-action meta instead of event * add gha_meta parameter * add gha_meta to wasm build command * make build manual for now * formatting * update actions * fix typo * fix typo * use gh action * fix typo * test new project * comment out meta comparison * test now * add github parameters * make coverage run conditional * test wasm builder * comment out if-else * update branch * set branch * only run for PRs that merge to main * add pass to give green CI * remove use of action trigger * concat url * add echa * update json format * cleanup * ignore cargo lock files * remove them from git * update to try out codecov * allow execution of modules cov script * add docker setup step * remove docker steps * add go install * Use on-liner for go install * don't install go in different terminal * test * update go install * test * try other syntax * try with source * touch bash.rs file * update go install * echo bashrc * bashrc -> bash_profile * add llvm-cov install * add install of build essentials * attempt with sudo * test * install libclang-dev * do one job to test thesis * try with larger runner * trigger ci * remove all-features flag from coverage run * uncomment all install commands --------- Co-authored-by: CircleCI <circleci@example.com>
- Loading branch information
1 parent
c313f08
commit 1ce9a4f
Showing
62 changed files
with
333 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/codecov@3.2.2 | ||
|
||
parameters: | ||
GHA_Event: | ||
type: string | ||
default: "" | ||
GHA_Actor: | ||
type: string | ||
default: "" | ||
GHA_Action: | ||
type: string | ||
default: "" | ||
GHA_Meta: | ||
type: string | ||
default: "" | ||
|
||
workflows: | ||
version: 2 | ||
build-and-commit: | ||
when: | ||
equal: [ "build_wasms", << pipeline.parameters.GHA_Meta >>] | ||
jobs: | ||
- build | ||
modules-coverage: | ||
when: | ||
equal: [ "modules_coverage", << pipeline.parameters.GHA_Meta >>] | ||
jobs: | ||
- coverage | ||
# Add this to give green CI when nothing is ran | ||
pass: | ||
jobs: | ||
- pass | ||
|
||
jobs: | ||
build: | ||
machine: | ||
image: ubuntu-2004:202201-02 | ||
# docker: | ||
# - image: cimg/rust:1.72.0 | ||
steps: | ||
- setup_remote_docker: | ||
version: 20.10.14 | ||
- checkout | ||
- run: | ||
name: Build WASM artifacts | ||
command: | | ||
./scripts/wasm-all-ci.sh | ||
- run: | ||
name: Commit and push artifacts | ||
command: | | ||
git config --global user.name 'CircleCI' | ||
git config --global user.email 'circleci@example.com' | ||
git add . | ||
git commit -m 'Update WASM artifacts [skip ci]' | ||
git push origin $CIRCLE_BRANCH | ||
coverage: | ||
# https://circleci.com/developer/images?imageType=machine | ||
docker: | ||
- image: cimg/rust:1.72.0 | ||
resource_class: xlarge | ||
steps: | ||
# - setup_remote_docker: | ||
# version: 20.10.14 | ||
- checkout | ||
- run: | ||
name: Run tests with coverage for modules | ||
command: | | ||
./scripts/modules-coverage.sh | ||
- codecov/upload: | ||
file: ./modules/lcov.info | ||
|
||
pass: | ||
docker: | ||
# Primary container image where all steps run | ||
- image: cimg/base:2022.05 | ||
steps: | ||
- run: | ||
name: Pass | ||
command: | | ||
echo "Pass" |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: CircleCI Wasm Builder | ||
|
||
# Job that updates the wasms of the mono-repo after a PR is merged to main. | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch') && github.base_ref == 'main' | ||
steps: | ||
- name: Tickle CircleCI | ||
env: | ||
CCI_TOKEN: ${{ secrets.CCI_TOKEN }} | ||
run: | | ||
curl -X POST \ | ||
-H "Circle-Token: ${CCI_TOKEN}" \ | ||
-H 'Content-Type: application/json' \ | ||
-H 'Accept: application/json' \ | ||
-d '{ | ||
"branch": "main", | ||
"parameters": { | ||
"GHA_Meta": "build_wasms" | ||
} | ||
}' https://circleci.com/api/v2/project/gh/AbstractSDK/abstract/pipeline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM --platform=linux/amd64 rust:1.72 as base | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
wget \ | ||
gcc \ | ||
libclang-dev \ | ||
ca-certificates \ | ||
--no-install-recommends \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
# Set Go version | ||
ENV GO_VERSION=1.18 | ||
|
||
# Download Go and install it to /usr/local | ||
RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -O /tmp/go${GO_VERSION}.linux-amd64.tar.gz \ | ||
&& tar -C /usr/local -xzf /tmp/go${GO_VERSION}.linux-amd64.tar.gz \ | ||
&& rm /tmp/go${GO_VERSION}.linux-amd64.tar.gz | ||
|
||
# Create .cargo/bin directory | ||
RUN mkdir -p $HOME/.cargo/bin | ||
|
||
# Set environment variables for Go and Cargo | ||
ENV GOROOT=/usr/local/go | ||
ENV GOPATH=/root/go | ||
ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin:/root/.cargo/bin | ||
|
||
|
||
# Install cargo-llvm-cov | ||
RUN host=$(rustc -Vv | grep host | sed 's/host: //') \ | ||
&& curl -LsSf /~https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-$host.tar.gz | tar xzf - -C $HOME/.cargo/bin | ||
|
||
# Set working directory | ||
WORKDIR /code | ||
|
||
COPY scripts/modules-coverage.sh modules-coverage.sh | ||
|
||
RUN chmod +x modules-coverage.sh | ||
# # Create lock file if it does not exist | ||
# RUN if [ ! -f Cargo.lock ]; then cargo generate-lockfile; fi | ||
|
||
# Run coverage job | ||
CMD ["bash", "scripts/modules-coverage.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
239c1b05822d728e92751215ca4e0a5ea273a3cbc884eea389503663267ea846 app-aarch64.wasm | ||
1608ddd5db7d8c0015ac499e14bc7d8a181f837dbd9e43fa1d7eb2fe428d1f4b template_app-aarch64.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
699bf3e1a0d8cb7ba45896bd56d52e6f7fb8c82544a967394bc44812c5850b0c ./target/wasm32-unknown-unknown/release/app.wasm | ||
49d0c96f981da786c389ba5e8aaae7109714069c2ffc956de1ed4e1b8ca7b267 ./target/wasm32-unknown-unknown/release/template_app.wasm |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
35d3589584da49b148f43428cb2e417abd241c16b3b6c42f317574ef44eba91f abstract_account_factory-aarch64.wasm | ||
cd05beff8379186f10e3316d6dc550c3f85dfad87a5a526126cf941a079e268c abstract_ans_host-aarch64.wasm | ||
3bb0ccae5238c31094e3a60fb77a6cc90a48a9a0854b23ed3dfd961bf549c9f9 abstract_ibc_client-aarch64.wasm | ||
a206a6869c1dc059fec4779a1e616d03c4fbba44bd23fdd9a74dffe7da2cbb8f abstract_manager-aarch64.wasm | ||
7fee79e05002a6adbd5fbaa0446264e92fe04c4242d4ad3c031b5727a12fc299 abstract_module_factory-aarch64.wasm | ||
d56fb17829b570e08fd47f70604ae5fe3ac615272e87dd6848887a44bc4e5cc4 abstract_proxy-aarch64.wasm | ||
ddb31ebc5edf3ff6cb74e019f9afd3336791dac2170837713f2127bc78046476 abstract_version_control-aarch64.wasm | ||
02fa33c536fdebb3d84edf552bce99a529f4df39a26c6922c3332e99e0957d30 abstract_account_factory-aarch64.wasm | ||
3fc3fe1464d6a853029829cfb28c6d4422289ba8be35af6d2115c4f1bd24fc88 abstract_ans_host-aarch64.wasm | ||
afc2bbc31169882c0bbeeb9a5e13e89ddd6290c0a5c00f3d22b0929809c1ac4c abstract_ibc_client-aarch64.wasm | ||
ef24516744c221b38c0d84d4178971c72649d566af8c35edad88d3e10eefd891 abstract_manager-aarch64.wasm | ||
2c671d1d0b8e01aea31572efe16ec887564aec7f3eb00ce759882939b5d4fcb5 abstract_module_factory-aarch64.wasm | ||
870eb18578adacc74893d6eea620e8fcf426b68517ef6acbe491cacce683c916 abstract_proxy-aarch64.wasm | ||
e8bfc17c7c1dd0fc577719309d8f414448c97fcb455e57dc9d3485a4ad212aa5 abstract_version_control-aarch64.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
45becbc7a4ac848cee19d04a0f73939b20cbc9eb03f6a230434bfada11055b70 target/wasm32-unknown-unknown/release/abstract_account_factory.wasm | ||
dd2f4324a53442ce6645d0ba5cc6e50667d069c874374e22cb16b527defd4d81 target/wasm32-unknown-unknown/release/abstract_ans_host.wasm | ||
71c575a389e6ea631a9c342f3573bf88afa4d90219dbf201d9a40f9023e473ce target/wasm32-unknown-unknown/release/abstract_ibc_client.wasm | ||
07e563a9677ac303cf827cd6210d6d2c5577a8268d8f87771a29c4dde27bf23f target/wasm32-unknown-unknown/release/abstract_manager.wasm | ||
7d49a4e312924b819104f685b4b22f26eabe50b5c580e57453c3f19915a73a07 target/wasm32-unknown-unknown/release/abstract_module_factory.wasm | ||
595108212014a15e7b0f1e845739d91d41d2b933cfe51a2f650b98b0a71a29bf target/wasm32-unknown-unknown/release/abstract_proxy.wasm | ||
971f08054b8000aa5a0ff6d3e02b387da85da7e733907805a07c498a08883332 target/wasm32-unknown-unknown/release/abstract_version_control.wasm | ||
d8a13e7ea696cc87d190fe03e7b51fe05cbcfb88f60d4f6cd0d6bfa5f5242e08 target/wasm32-unknown-unknown/release/abstract_account_factory.wasm | ||
22dc91d17712837fb9a1a3f61cf75ecc5f6ea12dc5beefe7b272559fb9e82438 target/wasm32-unknown-unknown/release/abstract_ans_host.wasm | ||
0ad7db5c0c6e23da5d43d99db5f08c0fe5155a94306573f4ca635048b4ae55ca target/wasm32-unknown-unknown/release/abstract_ibc_client.wasm | ||
e3b2a01a3897505defd473f52bf22de5de44a14e6d5d12921f4383719267c776 target/wasm32-unknown-unknown/release/abstract_manager.wasm | ||
09f21b3b3beed0836a16fc26890c33bad289812887e049cc317cbbbfacb4c046 target/wasm32-unknown-unknown/release/abstract_module_factory.wasm | ||
6b02ca9ebd0ac3b6bba95f2b6faa7eb35939237121ce7714f585d33630f54cd6 target/wasm32-unknown-unknown/release/abstract_proxy.wasm | ||
bbbb7270ab63a5f6dc25f0d352884473486d51f5eec0db012f3d7745b0eab60f target/wasm32-unknown-unknown/release/abstract_version_control.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
15fbca51c17d6efabdf58ae35ca30a240e7f40041d81baccf991e3cdf9675930 abstract_cw_staking-aarch64.wasm | ||
08280b407a85abb252464b7072ecf2597fd9ab09508448f4819698b26e65f340 abstract_cw_staking-juno-aarch64.wasm | ||
25a7b6c50dc69e7dc609e1fa799a27c98f0b313091508a7b911504ccba4e352f abstract_cw_staking-kujira-aarch64.wasm | ||
7cf5a559a2c10986775e296c5566ee78023111b27412085e868749262bfef9e5 abstract_cw_staking-neutron-aarch64.wasm | ||
e8352f4b8fe08acb7cddbd7ed08bd0c6a77f3d30fcbd9f49701aeb277aa31c88 abstract_cw_staking-osmosis-aarch64.wasm | ||
f78aa40ace70e1a71ca4bbf66251840f368564726d74131c95e8b9e60ffd8282 abstract_cw_staking-terra-aarch64.wasm | ||
ded2478f10796d60a786397807880eb80a8236eb05b2e0ba76deb3e7131e223b abstract_dca_app-aarch64.wasm | ||
5f078555060476e9d09c7501cecd05889778c001596c5705279862a9338818ab abstract_dex_adapter-aarch64.wasm | ||
c85668940e9ba440b8d28b8a7cde0397884d6e37d960e65fb46f9fbbe1826f4a abstract_dex_adapter-juno-aarch64.wasm | ||
9987b0754d212a2c42139660ea68a8765dedf09705e505077b79f3a5fb3d0601 abstract_dex_adapter-kujira-aarch64.wasm | ||
990725ba733843ddd406f1c20fc5f855e4305c5590c4ed4882b7c67da04801b5 abstract_dex_adapter-neutron-aarch64.wasm | ||
eee7a07e268da828eda1deac5d995535a220d4cafd4031f9b35c013c09e717e5 abstract_dex_adapter-osmosis-aarch64.wasm | ||
186028c475b9adacf9f229d1234c3e4e250bf2cfeb1cd5b3a040366a049b8e89 abstract_dex_adapter-terra-aarch64.wasm | ||
241514defcd2ea5f457018f61cf55398ab531840e2f5b6710b13ab5a1465b4fa abstract_etf-aarch64.wasm | ||
2bab74b99ef08b074f407fa153788e18ef60c020ef21c658b2299dfa2a87841f abstract_tendermint_staking_adapter-aarch64.wasm | ||
9b700f62d20238e30ce187182fe6725e15236c3000ac0c6f0ea1450b359ca3d2 croncat_app-aarch64.wasm | ||
41b2f0f2e1244cdbae663aef45abf2b7efaf9c72fed9fc00f10d163217bc5dea abstract_cw_staking-juno.wasm | ||
63bbca3b2e1142539ebf3868c49bd5ac39c2f32db515366bd9f657a63e4cfb15 abstract_cw_staking-kujira.wasm | ||
dd329c6e73919fff550cb36473f9eb6f9101b913e51b62a3cc932a2367ec6166 abstract_cw_staking-neutron.wasm | ||
6f632935b3d85c16a6a4b9eb2f334d83043ab61086b764fe0639666603d7bb0b abstract_cw_staking-osmosis.wasm | ||
f85fddeabcb8c78a386db978224525ef3205b7db6aca07a39f27c3aa5b72609b abstract_cw_staking-terra.wasm | ||
1af60319ec3795f143b1588e6af33e6fc166d3a1e1fdb9ef6a8204aeefc56a06 abstract_cw_staking.wasm | ||
3aeebbcbf2fdc6476a0795cc734cf0eeffdfe14ae670b34eba8a940ca2d52eeb abstract_dca_app.wasm | ||
fa8be695e787deb7704170b024e8721fd29f70e868b0fb884971615b016889a7 abstract_dex_adapter-juno.wasm | ||
8d51c304530ce4e969b6f173672d0f1ea50a15d325be3e262b1292af7d905ad6 abstract_dex_adapter-kujira.wasm | ||
d212cc9fb30b30d4dd06646d5c9d5cf2e0891d0a5489548f1c57574995c0866c abstract_dex_adapter-neutron.wasm | ||
de686d1a3236d4bef03b4efa67ef05599a01e0c4ed8258c26a922d3da0516e83 abstract_dex_adapter-osmosis.wasm | ||
45cbcd96d9b284cf3d72d591c361f00c2655ae703f7c6929b25d8ecbd1f00519 abstract_dex_adapter-terra.wasm | ||
d8ff71d06fa33dbf421732cccd0505eecb5df46b0492a38359c214c72249d862 abstract_dex_adapter.wasm | ||
ed7fda8add98308e7332f894625f74426f275101d26533c5afcac23cac2f46e2 abstract_etf.wasm | ||
e45dc3b30f87b53d1bbe4780e08a033686d2882dc7c0d56112f194b2321ad12d abstract_tendermint_staking_adapter.wasm | ||
e718479522963abea734dfec8e78abbc264b7c1ded939549f3218f7ba4311b5e croncat_app.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
0cd1000c4d95ab80a5687b60d405f1db6705f672a91c40865c88add215c8f070 target/wasm32-unknown-unknown/release/abstract_cw_staking.wasm | ||
91a691f5c1e9327edc1c14480b386ddcd368ef55995f9efb4cbfeec195065793 target/wasm32-unknown-unknown/release/abstract_dca_app.wasm | ||
e653d542e1e8eb9900caada9433485e6914dc97abe4c85fa9d6550948d6fec75 target/wasm32-unknown-unknown/release/abstract_dex_adapter.wasm | ||
fb467010618851e02862be3b31b91d5fa42472a851e7d0b034730888da1b6398 target/wasm32-unknown-unknown/release/abstract_etf.wasm | ||
bbf9acdf7342baa9832fbb382c00684c73a7aef67497597fd48bb1285a4d0e93 target/wasm32-unknown-unknown/release/abstract_tendermint_staking_adapter.wasm | ||
b8fec9eec0648be9415b663ef0b9c7de8cb450a554f351018c1c6a385ad8bf3f target/wasm32-unknown-unknown/release/croncat_app.wasm | ||
4144328ebc1f81b6dc3b949846c8f993acb0541163d22ac45a3deafcbc21c488 target/wasm32-unknown-unknown/release/abstract_cw_staking.wasm | ||
726be3d876b7a8c989300442de636a3827931c40235274ece0e68e2965cf1580 target/wasm32-unknown-unknown/release/abstract_dca_app.wasm | ||
577d43933b008870bb0f740acb66fcfa006d67936ff2e0b679b467f1696b489a target/wasm32-unknown-unknown/release/abstract_dex_adapter.wasm | ||
41ce843c9d5eff7eda0004ea9237c28a031bfaa258823d41c3ae9c75fa834031 target/wasm32-unknown-unknown/release/abstract_etf.wasm | ||
970efbeee6e8f93810c68e58f7024f20fb0ccbf45a2f1f4ea76f035b1501d8ed target/wasm32-unknown-unknown/release/abstract_tendermint_staking_adapter.wasm | ||
ad8707059463a4d60925638f9e24055876105b610463fec9dd2534cb094d9d17 target/wasm32-unknown-unknown/release/croncat_app.wasm |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# go into the directory we want to compile | ||
cd ./modules | ||
|
||
# Install cargo-llvm-cov for coverage generation | ||
# Get host target | ||
host=$(rustc -Vv | grep host | sed 's/host: //') | ||
# # Download binary and install to $HOME/.cargo/bin | ||
curl -LsSf /~https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-$host.tar.gz | tar xzf - -C $HOME/.cargo/bin | ||
|
||
# Create lock file if it does not exist | ||
if [ ! -f Cargo.lock ]; then | ||
cargo generate-lockfile | ||
fi | ||
|
||
sudo apt-get update && sudo apt-get install libclang-dev -y | ||
|
||
# Set Go version | ||
GO_VERSION="1.18" | ||
|
||
# Download Go | ||
wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -O /tmp/go${GO_VERSION}.linux-amd64.tar.gz | ||
|
||
# Extract Go archive | ||
sudo tar -C /usr/local -xzf /tmp/go${GO_VERSION}.linux-amd64.tar.gz | ||
|
||
# Set environment variables | ||
echo "export GOROOT=/usr/local/go" >> ~/.bash_profile | ||
echo "export GOPATH=$HOME/go" >> ~/.bash_profile | ||
echo "export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin" >> ~/.bash_profile | ||
|
||
# Load the environment variables | ||
source ~/.bash_profile | ||
|
||
# Check the installed version | ||
go version | ||
|
||
cargo llvm-cov --locked --lcov --output-path lcov.info | ||
|
||
# print the result. | ||
ls -la . |
Oops, something went wrong.