Skip to content

Commit bf5c9ef

Browse files
authored
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 9e00372 commit bf5c9ef

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

workflow-templates/appstore-build-publish.yml

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

0 commit comments

Comments
 (0)