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

Smaller #77

Merged
merged 2 commits into from
Aug 11, 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
38 changes: 34 additions & 4 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
build_upload_artifacts:
needs: [start_release]
needs: [ start_release ]
name: build_upload_artifacts
runs-on: ubuntu-latest
strategy:
matrix:
project: [myceli, controller]
project: [ myceli, controller, hyphae ]
target:
[
armv7-unknown-linux-gnueabihf,
Expand All @@ -42,7 +42,7 @@ jobs:
- name: clean cargo
run: cargo clean
- name: cargo/cross build
run: CROSS_CONFIG=Cross.toml cross build --bin ${{ matrix.project }} --target ${{ matrix.target }} --release
run: CROSS_CONFIG=Cross.toml cross build --bin ${{ matrix.project }} --target ${{ matrix.target }} --release --features big
- name: Archive binary
run: tar -czvf ${{ matrix.project }}-${{ matrix.target }}.tar.gz -C ./target/${{ matrix.target }}/release ${{ matrix.project }}
- name: upload binary
Expand All @@ -54,9 +54,39 @@ jobs:
SOURCE_PATH: ./${{ matrix.project }}-${{ matrix.target }}.tar.gz
TARGET_PATH: ./${{ matrix.project }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
shell: bash
small:
needs: [ start_release ]
name: small
runs-on: ubuntu-latest
strategy:
matrix:
target:
[
armv7-unknown-linux-gnueabihf,
aarch64-unknown-linux-gnu,
]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: clean cargo
run: cargo clean
- name: cargo/cross build
run: CROSS_CONFIG=Cross.toml cross build --bin myceli --target ${{ matrix.target }} --profile small --features small --no-default-features
- name: Compress binary
run: |
tar -cvf myceli-small-${{ github.ref_name }}-${{ matrix.target }}.tar -C ./target/${{ matrix.target }}/small myceli
xz -9 --keep --extreme myceli-small-${{ github.ref_name }}-${{ matrix.target }}.tar
gzip --best myceli-small-${{ github.ref_name }}-${{ matrix.target }}.tar
- name: upload binary
run: gh release upload "$GITHUB_REF" myceli-small-${{ github.ref_name }}-${{ matrix.target }}.tar.?z
env:
GITHUB_TOKEN: ${{ github.token }}
shell: bash

build_upload_docker:
needs: [start_release]
needs: [ start_release ]
name: build_upload_docker
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI Linting
on: [pull_request]
on: [ pull_request ]
jobs:
clippy_check:
name: Run clippy check
Expand All @@ -16,5 +16,5 @@ jobs:
toolchain: ${{ steps.rust.outputs.toolchain }}
components: clippy
- name: Run clippy
run: cargo clippy --all
run: cargo clippy --all --features big
shell: bash
11 changes: 7 additions & 4 deletions .github/workflows/unit-testing.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI Unit Testing
on: [pull_request]
on: [ pull_request ]
jobs:
build_and_test:
name: Build and test rust
Expand All @@ -10,8 +10,11 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Build workspace
run: cargo build --release
run: cargo build --release --features big
shell: bash
- name: Test workspace
run: cargo test
- name: Test big
run: cargo test --features big
shell: bash
- name: Test small
run: cargo test --features small
shell: bash
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ target/
.DS_Store
.vscode/
build/
storage.db
storage.db
sat/
gnd/
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/space.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 51 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading