Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use rust-cache #81

Merged
merged 2 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: install deps
run: |
sudo make install-deps
Expand All @@ -24,8 +26,6 @@ jobs:
path: |
Makefile
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: get submodule
run: git submodule update --init --recursive
- name: make
run: make -C runtime/cpp
- name: make build-lib
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: get submodule
run: git submodule update --init --recursive --remote
with:
submodules: 'recursive'
- name: install deps
run: |
sudo make install-deps && sudo make /opt/wasi-sdk
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-asserts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: install deps
run: |
sudo make install-deps
Expand All @@ -42,8 +44,6 @@ jobs:
path: |
Makefile
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: get submodule
run: git submodule update --init --recursive
- name: make
run: make -C runtime/cpp
- name: examples with cpp runtime
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/release-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: get submodule
run: git submodule update --init --recursive --remote
with:
submodules: 'recursive'

# setup Docker buld action
- name: Set up Docker Buildx
Expand All @@ -25,19 +24,25 @@ jobs:

- name: Login to Github Packages
uses: docker/login-action@v2
if: ${{ github.repository_owner == 'eunomia-bpf' }}
if: github.repository_owner == 'eunomia-bpf'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: sudo make install-deps

- name: Cache rust
uses: Swatinem/rust-cache@v2
with:
workspaces: runtime

- name: Build runtime
run: make build-rust

- name: Build wasm-bpf image and push to GitHub Container Registry
uses: docker/build-push-action@v2
if: ${{ github.repository_owner == 'eunomia-bpf' }}
if: github.repository_owner == 'eunomia-bpf'
with:
# relative path to the place where source code with Dockerfile is located
context: ./
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,42 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: install deps
run: |
sudo make install-deps
make /opt/wasi-sdk
make tinygo
- name: Cache
uses: actions/[email protected]

- name: Cache rust
uses: Swatinem/rust-cache@v2
with:
path: |
Makefile
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: get submodule
run: git submodule update --init --recursive
workspaces: runtime

- name: Build
run: make build-rust
- name: test wasm-bpf-rs
run: cd runtime/wasm-bpf-rs && make test
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
if: ${{ github.repository_owner == 'eunomia-bpf' }}
if: github.repository_owner == 'eunomia-bpf'
with:
sarif_file: runtime/wasm-bpf-rs/rust-clippy-results.sarif
wait-for-processing: true

- name: Code coverage using Codecov
if: github.repository_owner == 'eunomia-bpf'
run: bash <(curl -s https://codecov.io/bash)
- name: examples with rust runtime
run: IMPL=rust make -C examples
- name: Upload build result
uses: actions/[email protected]
if: github.repository_owner == 'eunomia-bpf'
with:
path: "wasm-bpf-rs"