Skip to content

Commit

Permalink
Update rust workflow (#1610)
Browse files Browse the repository at this point in the history
## Что этот PR делает
В рамках подготовки к мерге апстрима.
  • Loading branch information
m-dzianishchyts authored Oct 23, 2024
1 parent 190364b commit 578b129
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build MILLA
name: Build Rust library
on:
issue_comment:
types: created

jobs:
build-milla:
build-rust:
if: |
github.event.issue.pull_request &&
(github.event.comment.body == '!build_milla') &&
(github.event.comment.body == '!build_rust') &&
((github.event.sender.id == github.event.issue.user.id) ||
(github.event.comment.author_association == 'COLLABORATOR') ||
(github.event.comment.author_association == 'MEMBER') ||
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
ref: ${{ env.PR_BRANCH }}
token: ${{ env.GH_TOKEN }}

- name: Build MILLA
- name: Build rustlibs
env:
BASE_BRANCH: ${{ github.event.repository.default_branch }}
BASE_REPOSITORY: ${{ github.repository }}
Expand All @@ -65,7 +65,7 @@ jobs:
git pull origin "$PR_BRANCH" --depth=$((ahead_by + 1))
git remote add upstream "https://github.com/$BASE_REPOSITORY.git"
git fetch upstream "$BASE_BRANCH" --depth=$((behind_by + 1))
cd milla
cd rust
# Get dependencies.
rustup target add i686-unknown-linux-gnu
Expand All @@ -79,13 +79,13 @@ jobs:
cargo build --release --target i686-pc-windows-gnu
# Copy the built targets to their checked-in locations.
cp target/i686-unknown-linux-gnu/release/libmilla.so ../tools/ci/libmilla_ci.so
cp target/i686-pc-windows-gnu/release/milla.dll ../milla.dll
cp target/i686-unknown-linux-gnu/release/librustlibs.so ../tools/ci/librustlibs_ci.so
cp target/i686-pc-windows-gnu/release/rustlibs.dll ../rustlibs.dll
git commit -a -m "Build MILLA" --allow-empty
git commit -a -m "Build Rust library" --allow-empty
git push origin
- name: Notify Failure
if: failure() && env.FAIL_NOTIFIED != 'true'
run: |
gh pr comment ${{ github.event.issue.html_url }} -b 'Building MILLA failed, see the action run log for details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
gh pr comment ${{ github.event.issue.html_url }} -b 'Building Rust library failed, see the action run log for details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'

0 comments on commit 578b129

Please sign in to comment.