rust.yml
1 on: [push, pull_request] 2 3 name: CI 4 5 env: 6 # This is required to enable the web_sys clipboard API which egui_web uses 7 # https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html 8 # https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html 9 RUSTFLAGS: --cfg=web_sys_unstable_apis 10 RUSTDOCFLAGS: -D warnings 11 12 jobs: 13 check_default: 14 name: cargo check (default features) 15 runs-on: ubuntu-latest 16 steps: 17 - uses: actions/checkout@v2 18 - uses: actions-rs/toolchain@v1 19 with: 20 profile: minimal 21 toolchain: 1.56.0 22 override: true 23 - run: sudo apt-get update && sudo apt-get install libspeechd-dev 24 - uses: actions-rs/cargo@v1 25 with: 26 command: check 27 28 check_all_features: 29 name: cargo check --all-features 30 runs-on: ubuntu-latest 31 steps: 32 - uses: actions/checkout@v2 33 - uses: actions-rs/toolchain@v1 34 with: 35 profile: minimal 36 toolchain: 1.56.0 37 override: true 38 - run: sudo apt-get update && sudo apt-get install libspeechd-dev 39 - uses: actions-rs/cargo@v1 40 with: 41 command: check 42 args: --all-features 43 44 check_web_default: 45 name: cargo check web (default features) 46 runs-on: ubuntu-latest 47 steps: 48 - uses: actions/checkout@v2 49 - uses: actions-rs/toolchain@v1 50 with: 51 profile: minimal 52 toolchain: 1.56.0 53 override: true 54 - run: rustup target add wasm32-unknown-unknown 55 - uses: actions-rs/cargo@v1 56 with: 57 command: check 58 args: -p egui_demo_app --lib --target wasm32-unknown-unknown 59 60 check_egui_demo_app: 61 name: cargo check -p egui_demo_app 62 runs-on: ubuntu-20.04 63 steps: 64 - uses: actions/checkout@v2 65 - uses: actions-rs/toolchain@v1 66 with: 67 profile: minimal 68 toolchain: 1.56.0 69 override: true 70 - name: check 71 run: cargo check -p egui_demo_app 72 73 check_wasm_eframe_with_features: 74 name: cargo check wasm eframe 75 runs-on: ubuntu-20.04 76 steps: 77 - uses: actions/checkout@v2 78 - uses: actions-rs/toolchain@v1 79 with: 80 profile: minimal 81 toolchain: 1.56.0 82 override: true 83 - run: rustup target add wasm32-unknown-unknown 84 - name: check 85 run: cargo check -p eframe --lib --no-default-features --features persistence --target wasm32-unknown-unknown 86 87 check_web_all_features: 88 name: cargo check web --all-features 89 runs-on: ubuntu-latest 90 steps: 91 - uses: actions/checkout@v2 92 - uses: actions-rs/toolchain@v1 93 with: 94 profile: minimal 95 toolchain: 1.56.0 96 override: true 97 - run: rustup target add wasm32-unknown-unknown 98 - uses: actions-rs/cargo@v1 99 with: 100 command: check 101 args: -p egui_demo_app --lib --target wasm32-unknown-unknown --all-features 102 103 test: 104 name: cargo test 105 runs-on: ubuntu-latest 106 steps: 107 - uses: actions/checkout@v2 108 - uses: actions-rs/toolchain@v1 109 with: 110 profile: minimal 111 toolchain: 1.56.0 112 override: true 113 - run: sudo apt-get update && sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libgtk-3-dev # libgtk-3-dev is used by rfd 114 - uses: actions-rs/cargo@v1 115 with: 116 command: test 117 args: --all-features 118 119 fmt: 120 name: cargo fmt 121 runs-on: ubuntu-latest 122 steps: 123 - uses: actions/checkout@v2 124 - uses: actions-rs/toolchain@v1 125 with: 126 profile: minimal 127 toolchain: 1.56.0 128 override: true 129 - run: rustup component add rustfmt 130 - uses: actions-rs/cargo@v1 131 with: 132 command: fmt 133 args: --all -- --check 134 135 clippy: 136 name: cargo clippy 137 runs-on: ubuntu-latest 138 steps: 139 - uses: actions/checkout@v2 140 - uses: actions-rs/toolchain@v1 141 with: 142 profile: minimal 143 toolchain: 1.56.0 144 override: true 145 - run: rustup component add clippy 146 - run: sudo apt-get update && sudo apt-get install libspeechd-dev libgtk-3-dev # libgtk-3-dev is used by rfd 147 - uses: actions-rs/cargo@v1 148 with: 149 command: clippy 150 args: --workspace --all-targets --all-features -- -D warnings -W clippy::all 151 152 doc: 153 name: cargo doc 154 runs-on: ubuntu-latest 155 steps: 156 - uses: actions/checkout@v2 157 - uses: actions-rs/toolchain@v1 158 with: 159 profile: minimal 160 toolchain: 1.56.0 161 override: true 162 - run: sudo apt-get update && sudo apt-get install libspeechd-dev 163 - run: cargo doc -p emath -p epaint -p egui -p eframe -p epi -p egui_web -p egui-winit -p egui_extras -p egui_glium -p egui_glow --lib --no-deps --all-features 164 165 doc_web: 166 name: cargo doc web 167 runs-on: ubuntu-latest 168 steps: 169 - uses: actions/checkout@v2 170 - uses: actions-rs/toolchain@v1 171 with: 172 profile: minimal 173 toolchain: 1.56.0 174 override: true 175 - run: sudo apt-get update && sudo apt-get install libspeechd-dev 176 - run: rustup target add wasm32-unknown-unknown 177 - run: cargo doc -p egui_web --target wasm32-unknown-unknown --lib --no-deps --all-features 178 179 cargo-deny: 180 runs-on: ubuntu-20.04 181 steps: 182 - uses: actions/checkout@v2 183 - uses: EmbarkStudios/cargo-deny-action@v1 184 185 wasm_bindgen: 186 name: wasm-bindgen 187 runs-on: ubuntu-latest 188 steps: 189 - uses: actions/checkout@v2 190 - uses: actions-rs/toolchain@v1 191 with: 192 profile: minimal 193 toolchain: 1.56.0 194 override: true 195 - run: rustup target add wasm32-unknown-unknown 196 - run: cargo install wasm-bindgen-cli 197 - run: ./sh/wasm_bindgen_check.sh