@@ -40,40 +40,16 @@ jobs:
4040 echo "matrix.build.TARGET : ${{ matrix.build.TARGET }}"
4141 - name : Checkout
4242 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43- - name : Install node
44- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
43+ - name : Set up Node
44+ uses : ./.github/actions/setup-node
45+ - name : Set up Rust build
46+ uses : ./.github/actions/setup-rust-build
4547 with :
46- node-version : 24
47- registry-url : " https://registry.npmjs.org"
48- - name : Update npm
49- run : npm install -g npm@latest
50- - name : Install rust toolchain
51- uses : dtolnay/rust-toolchain@stable
48+ target : ${{ matrix.build.TARGET }}
49+ - name : Build Rust binary
50+ uses : ./.github/actions/build-rust-binary
5251 with :
53- targets : ${{ matrix.build.TARGET }}
54- components : rustfmt, clippy
55- - name : Add target to active toolchain
56- shell : bash
57- run : rustup target add ${{ matrix.build.TARGET }}
58- - name : Set up cargo cache
59- uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
60- - name : Install just
61- uses : extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
62- with :
63- just-version : 1.35.0
64- - name : Install cross
65- if : ${{ matrix.build.OS == 'ubuntu-latest' }}
66- uses : taiki-e/install-action@v2
67- with :
68- tool : cross
69- - name : Build rust binary (cross)
70- if : ${{ matrix.build.OS == 'ubuntu-latest' }}
71- shell : bash
72- run : cross build --release --locked --target ${{ matrix.build.TARGET }}
73- - name : Build rust binary (cargo)
74- if : ${{ matrix.build.OS != 'ubuntu-latest' }}
75- shell : bash
76- run : cargo build --release --locked --target ${{ matrix.build.TARGET }}
52+ target : ${{ matrix.build.TARGET }}
7753 - name : (Test) Publish rust binary package to npm
7854 shell : bash
7955 run : |
8662 steps :
8763 - name : Checkout
8864 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
89- - name : Install node
90- uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
91- with :
92- node-version : 24
93- registry-url : " https://registry.npmjs.org"
94- - name : Update npm
95- run : npm install -g npm@latest
65+ - name : Set up Node
66+ uses : ./.github/actions/setup-node
9667 - name : Install just
9768 uses : extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
9869 with :
0 commit comments