Skip to content

Commit 538f45c

Browse files
icewind1991AndyScherzinger
authored andcommitted
Setup rust build dependencies for rust projects
Setup the rust toolchain when a Cargo.toml is detected Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 8e345fe commit 538f45c

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

workflow-templates/appstore-build-publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,31 @@ jobs:
8888
cd ${{ env.APP_NAME }}
8989
composer install --no-dev
9090
91+
- name: Check Cargo.toml
92+
id: check_cargo
93+
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
94+
with:
95+
files: "${{ env.APP_NAME }}/Cargo.toml"
96+
97+
- name: Install musl-tools
98+
if: steps.check_cargo.outputs.files_exists == 'true'
99+
run: |
100+
sudo apt-get install musl-tools
101+
102+
- name: Setup rust toolchain
103+
uses: actions-rs/toolchain@v1
104+
if: steps.check_cargo.outputs.files_exists == 'true'
105+
with:
106+
profile: minimal
107+
toolchain: stable
108+
override: true
109+
target: x86_64-unknown-linux-musl
110+
111+
- name: Install cargo-cross
112+
if: steps.check_cargo.outputs.files_exists == 'true'
113+
run: |
114+
cargo install cross --locked
115+
91116
- name: Build ${{ env.APP_NAME }}
92117
# Skip if no package.json
93118
if: ${{ steps.versions.outputs.nodeVersion }}

0 commit comments

Comments
 (0)