Skip to content

Commit

Permalink
Merge #1448: Refac workspace to follow rust guidelines.
Browse files Browse the repository at this point in the history
6175ca7 fix doc (edouardparis)
f32b6aa fix the reproducible build to include the workspace change (edouardparis)
8973ee0 fix test not building on windows (edouardparis)
f28b40f fix fuzz, build and tests (edouardparis)
2ab6e40 refac workspace: move files (edouardparis)

Pull request description:

  This PR clarifies the rust workspace with its members:
  - `liana`: The `lianad` and `liana-cli` crate
  - `liana-gui`: The gui crate to build the graphical interface
  - `liana-ui`: A crate to quickly iterate on a design system

  It allows to have coordination across crates easier, consistent build and shared dependency versions.
  As a result the build processes in the guix container and the macos container are way faster as the dependencies are built only once.

  The overall MSRV is changed for rust 1.71.1, which is the `liana-gui` MSRV.
  Only one rust version is used for all the crates.

  This PR is also a change of vision of the project. The liana daemon is not used as it is. It is too much cumbersome. It should be at the service of the future applications and for now at the service of the GUI.
  The security aspects of the project should be aware of what the end user is using and in reality it is the `liana-gui` binary.

ACKs for top commit:
  pythcoiner:
    ACK 6175ca7
  jp1ac4:
    ACK 6175ca7.

Tree-SHA512: 4b193ed92d3108672d785b28ed54ff95168d365f163235b72cd7e24a7023a7293853ddb458930fb4640d7b1c60a8965e1b38cc060a426474d50b29e2eec4a6d2
  • Loading branch information
edouardparis committed Nov 15, 2024
2 parents cfe653f + 6175ca7 commit 89a4187
Show file tree
Hide file tree
Showing 226 changed files with 6,238 additions and 6,888 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ task:
fingerprint_script:
- rustc --version
- cat tests/tools/taproot_signer/Cargo.lock
lianad_build_script: cargo build --release && cd tests/tools/taproot_signer && cargo build --release
lianad_build_script: cd liana && cargo build --release && cd ../tests/tools/taproot_signer && cargo build --release

deps_script: apt update && apt install -y python3 python3-pip

Expand Down
52 changes: 4 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,14 @@ jobs:
override: true
- name: rustfmt
run: cargo fmt -- --check
- name: clippy
run: cargo clippy --all-features --all-targets -- -D warnings

unit_tests:
needs: linter
strategy:
matrix:
toolchain:
- 1.63
- nightly
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
- name: Test on Rust ${{ matrix.toolchain }} (only Windows)
if: matrix.os == 'windows-latest'
run: cargo test --verbose --no-default-features
- name: Test on Rust ${{ matrix.toolchain }} (non Windows)
if: matrix.os != 'windows-latest'
run: cargo test --verbose --color always -- --nocapture

linter_gui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.78.0
components: rustfmt, clippy
override: true
- name: rustfmt
run: cd gui && cargo fmt -- --check
- name: clippy
run: |
sudo apt-get update &&
sudo apt-get install --allow-downgrades libudev-dev pkg-config libvulkan-dev &&
cd gui &&
cargo clippy --all-features --all-targets -- -D warnings
unit_tests_gui:
needs: linter_gui
unit_tests:
needs: linter
strategy:
matrix:
toolchain:
Expand All @@ -86,14 +43,13 @@ jobs:
profile: minimal
- name: Test on Rust ${{ matrix.toolchain }} (only Windows)
if: matrix.os == 'windows-latest'
run: cd gui && cargo test --verbose --no-default-features
run: cargo test --verbose --no-default-features
- name: Test on Rust ${{ matrix.toolchain }} (non Windows)
if: matrix.os == 'macOS-latest'
run: cd gui && cargo test --verbose --color always -- --nocapture
run: cargo test --verbose --color always -- --nocapture
- name: Test on Rust ${{ matrix.toolchain }} (non Windows)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update &&
sudo apt-get install libudev-dev libfontconfig1-dev &&
cd gui &&
cargo test --verbose --color always -- --nocapture
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ pytest.log
TODO
**/target
**/dist
gui/ui/Cargo.lock
gui/ui/examples/design-system/Cargo.lock
Xcode_12.2.xip
.idea/
fuzz/corpus
Loading

0 comments on commit 89a4187

Please sign in to comment.