|
71 | 71 | - name: Create firmware project |
72 | 72 | working-directory: . |
73 | 73 | run: rmkit create --keyboard-toml-path ${{ inputs.keyboard_toml_path }} --vial-json-path ${{ inputs.vial_json_path }} --version ${{ inputs.rmk_version }} --target-dir rmk |
| 74 | + - name: Cache cargo registry and target |
| 75 | + uses: Swatinem/rust-cache@v2 |
| 76 | + with: |
| 77 | + workspaces: "rmk -> target" |
| 78 | + key: ${{ needs.get_chip_name.outputs.chip_name }} |
74 | 79 | - name: Build firmware |
75 | 80 | working-directory: ./rmk |
76 | 81 | run: cargo build --release |
@@ -105,11 +110,25 @@ jobs: |
105 | 110 | sudo dpkg -i $LIBSSL |
106 | 111 | - name: Install rmkit, espflash and espup |
107 | 112 | run: cargo binstall rmkit espflash espup -y |
| 113 | + - name: Cache ESP Rust toolchain |
| 114 | + id: esp-toolchain-cache |
| 115 | + uses: actions/cache@v5 |
| 116 | + with: |
| 117 | + path: | |
| 118 | + ~/.rustup/toolchains/esp |
| 119 | + ~/export-esp.sh |
| 120 | + key: ${{ runner.os }}-esp-toolchain-${{ needs.get_chip_name.outputs.chip_name }}-v1 |
108 | 121 | - name: Prepare esp environment |
| 122 | + if: steps.esp-toolchain-cache.outputs.cache-hit != 'true' |
109 | 123 | run: espup install |
110 | 124 | - name: Create firmware project |
111 | 125 | working-directory: . |
112 | 126 | run: rmkit create --keyboard-toml-path ${{ inputs.keyboard_toml_path }} --vial-json-path ${{ inputs.vial_json_path }} --version ${{ inputs.rmk_version }} --target-dir rmk |
| 127 | + - name: Cache cargo registry and target |
| 128 | + uses: Swatinem/rust-cache@v2 |
| 129 | + with: |
| 130 | + workspaces: "rmk -> target" |
| 131 | + key: ${{ needs.get_chip_name.outputs.chip_name }} |
113 | 132 | - name: Build firmware for esp32 |
114 | 133 | working-directory: ./rmk |
115 | 134 | run: . /home/runner/export-esp.sh && cargo +esp build --release |
|
0 commit comments