-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cross-platform mudabar, wire up better CI (#75)
* fix cross-platform winit with muda bar fixes also wire up better CI * Follow up for `winit` backend and CI (#77) * Fix menu on windows * Refactor menu initialization * Fix missing gtk in CI * Create CONTRIBUTING.MD * Add info text --------- Co-authored-by: Matt Hunzinger <[email protected]>
- Loading branch information
1 parent
2e99ca1
commit f5cecd7
Showing
6 changed files
with
166 additions
and
45 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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: CI | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUSTDOCFLAGS: "-D warnings" | ||
|
@@ -69,3 +73,77 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo doc | ||
|
||
# just cargo check for now | ||
matrix_test: | ||
runs-on: ${{ matrix.platform.os }} | ||
if: github.event.pull_request.draft == false | ||
env: | ||
RUST_CARGO_COMMAND: ${{ matrix.platform.cross == true && 'cross' || 'cargo' }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- { | ||
target: x86_64-pc-windows-msvc, | ||
os: windows-latest, | ||
cross: false, | ||
command: "test", | ||
args: "--all --tests", | ||
setup: "" | ||
} | ||
- { | ||
target: x86_64-apple-darwin, | ||
os: macos-latest, | ||
cross: false, | ||
command: "test", | ||
args: "--all --tests", | ||
setup: "" | ||
} | ||
- { | ||
target: x86_64-unknown-linux-gnu, | ||
os: ubuntu-latest, | ||
cross: false, | ||
command: "test", | ||
args: "--all --tests", | ||
setup: "sudo apt-get update; sudo apt-get install --no-install-recommends \ | ||
libasound2-dev \ | ||
libatk1.0-dev \ | ||
libgtk-3-dev \ | ||
libudev-dev \ | ||
libpango1.0-dev \ | ||
libxdo-dev" | ||
} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install stable | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.platform.target }} | ||
components: rustfmt | ||
|
||
- name: Install cross | ||
if: ${{ matrix.platform.cross == true }} | ||
uses: taiki-e/install-action@cross | ||
|
||
- name: Free Disk Space (Ubuntu) | ||
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | ||
uses: jlumbroso/[email protected] | ||
with: # speed things up a bit | ||
large-packages: false | ||
docker-images: false | ||
swap-storage: false | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "${{ matrix.platform.target }}" | ||
cache-all-crates: "true" | ||
save-if: ${{ github.ref == 'refs/heads/main' }} | ||
|
||
- name: Setup | ||
run: ${{ matrix.platform.setup }} | ||
|
||
- name: test | ||
run: | | ||
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }} |
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,4 +1,5 @@ | ||
/target | ||
/Cargo.lock | ||
.DS_Store | ||
experiments | ||
experiments | ||
/.vscode |
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,43 @@ | ||
# Contributing to Blitz | ||
|
||
Welcome to the Dioxus community! | ||
Blitz is a "native" HTML/CSS renderer built to support the "Dioxus Native" project. It is effectively a lightweight webview except that the JavaScript engine is replaced with a native Rust API which allows Rust reactivity / state management libraries like Dioxus to interface with it directly. | ||
|
||
Talk to us in: the #native channel in the [Dioxus Discord](https://discord.gg/BWTrn6d3) | ||
|
||
## Development | ||
|
||
### Windows | ||
Building Blitz requires Python, which can be installed from the Windows app store. | ||
|
||
### Linux | ||
Requirements: | ||
* asound2 | ||
* atk1.0 | ||
* gtk-3 | ||
* udev | ||
* pango1.0 | ||
* xdo | ||
|
||
For example on Ubuntu you can install these by running: | ||
```sh | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
libasound2-dev \ | ||
libatk1.0-dev \ | ||
libgtk-3-dev \ | ||
libudev-dev \ | ||
libpango1.0-dev \ | ||
libxdo-dev | ||
``` | ||
|
||
### VSCode | ||
You can add the following JSON to your `.vscode/settings.json` to automically build Blitz on all supported targets. | ||
```json | ||
{ | ||
"rust-analyzer.check.features": "all", | ||
"rust-analyzer.cargo.features": "all", | ||
"rust-analyzer.check.allTargets": true, | ||
"rust-analyzer.cargo.allTargets": true | ||
} | ||
``` |
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
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