Mips64 rust stub #307
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
name: Martos ci workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
# TODO: all should be on self-hosted runners | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --lib --verbose | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests | |
run: cargo test --verbose | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Fmt | |
run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Clippy | |
run: cargo clippy -- -D clippy::all | |
xtensa-esp32-rust-example-hello-world: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: arkhipovivan1/xtensa-esp32-rust:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cd ./examples/rust-examples/xtensa-esp32/hello-world && . /root/export-esp.sh && cargo build | |
- name: Fmt | |
run: cd ./examples/rust-examples/xtensa-esp32/hello-world && cargo fmt --all -- --check | |
xtensa-esp32-rust-example-dynamic-memory: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: arkhipovivan1/xtensa-esp32-rust:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cd ./examples/rust-examples/xtensa-esp32/dynamic-memory && . /root/export-esp.sh && cargo build | |
- name: Fmt | |
run: cd ./examples/rust-examples/xtensa-esp32/dynamic-memory && cargo fmt --all -- --check | |
xtensa-esp32-rust-example-timer: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: arkhipovivan1/xtensa-esp32-rust:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cd ./examples/rust-examples/xtensa-esp32/timer && . /root/export-esp.sh && cargo build | |
- name: Fmt | |
run: cd ./examples/rust-examples/xtensa-esp32/timer && cargo fmt --all -- --check | |
xtensa-esp32-static-library: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: arkhipovivan1/xtensa-esp32-rust:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cd ./c-library/xtensa-esp32 && . /root/export-esp.sh && cargo build --release | |
- name: Fmt | |
run: cd ./c-library/xtensa-esp32 && cargo fmt --all -- --check | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xtensa-esp32-static-library | |
path: c-library/xtensa-esp32/target/xtensa-esp32-none-elf/release/libxtensa_esp32_static_lib.a | |
retention-days: 7 | |
xtensa-esp32-c-example: | |
needs: xtensa-esp32-static-library | |
runs-on: ubuntu-latest | |
env: | |
IDF_PATH: /root/esp/esp-idf | |
IDF_TOOLS_PATH: /root/.espressif | |
container: | |
image: arkhipovivan1/xtensa-esp32-c:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download static library | |
uses: actions/download-artifact@v4 | |
with: | |
name: xtensa-esp32-static-library | |
path: c-library/xtensa-esp32/target/xtensa-esp32-none-elf/release | |
- name: Build | |
run: cd ./examples/c-examples/xtensa-esp32 && . /root/esp/esp-idf/export.sh && make && esptool.py --chip esp32 elf2image --flash_mode="dio" --flash_freq "40m" --flash_size "4MB" -o main.bin main.elf | |
mips64-rust-example-hello-world: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: ubuntu:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: apt update && apt install curl build-essential lld -y && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && export PATH="/root/.cargo/bin:${PATH}" && . "$HOME/.cargo/env" && rustup toolchain install nightly && rustup default 1.71 && rustup target add mips64el-unknown-linux-gnuabi64 && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: Build | |
run: cd ./examples/rust-examples/mips64/hello-world && cargo build --release | |
- name: Fmt | |
run: cd ./examples/rust-examples/mips64/hello-world && cargo fmt --all -- --check | |
mips64-rust-example-dynamic-memory: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: ubuntu:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: apt update && apt install curl build-essential lld -y && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && export PATH="/root/.cargo/bin:${PATH}" && . "$HOME/.cargo/env" && rustup toolchain install nightly && rustup default 1.71 && rustup target add mips64el-unknown-linux-gnuabi64 && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: Build | |
run: cd ./examples/rust-examples/mips64/dynamic-memory && cargo build --release | |
- name: Fmt | |
run: cd ./examples/rust-examples/mips64/dynamic-memory && cargo fmt --all -- --check | |
mips64-rust-example-timer: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: ubuntu:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: apt update && apt install curl build-essential lld -y && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && export PATH="/root/.cargo/bin:${PATH}" && . "$HOME/.cargo/env" && rustup toolchain install nightly && rustup default 1.71 && rustup target add mips64el-unknown-linux-gnuabi64 && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: Build | |
run: cd ./examples/rust-examples/mips64/timer && cargo build --release | |
- name: Fmt | |
run: cd ./examples/rust-examples/mips64/timer && cargo fmt --all -- --check | |
mips64-static-library: | |
runs-on: ubuntu-latest | |
env: | |
CARGO_HOME: /root/.cargo | |
RUSTUP_HOME: /root/.rustup | |
container: | |
image: ubuntu:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: apt update && apt install curl build-essential lld -y && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && export PATH="/root/.cargo/bin:${PATH}" && . "$HOME/.cargo/env" && rustup toolchain install nightly && rustup default 1.71 && rustup target add mips64el-unknown-linux-gnuabi64 && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu | |
- name: test | |
run: cd /usr/lib && tree ./rustlib && cd /usr/lib/rustlib/src/rust && ls && cargo generate-lockfile | |
- name: Build | |
run: cd ./c-library/mips64 && cargo +nightly build --release | |
- name: Fmt | |
run: cd ./c-library/mips64 && cargo fmt --all -- --check | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mips64-static-library | |
path: c-library/mips64/target/mips64el-unknown-linux-gnuabi64/release/libmips64_static_lib.a | |
retention-days: 7 |