Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@ jobs:
# TODO: rustup target add aarch64-unknown-linux-gnu
# Linting tools
cargo install cargo-shear
cargo fetch --locked
cargo fetch

- name: Build
id: build
if: always()
run: cargo build --profile ${{ env.build-type }} --locked
run: cargo build --profile ${{ env.build-type }}

- name: Tests
id: tests
if: always()
run: cargo test --profile ${{ env.build-type }} --locked
run: cargo test --profile ${{ env.build-type }}

- name: Clippy
id: clippy
if: always()
run: cargo clippy --profile ${{ env.build-type }} --no-deps --locked -- --deny warnings
run: cargo clippy --profile ${{ env.build-type }} --no-deps -- --deny warnings

- name: Format
id: format
Expand All @@ -93,7 +93,7 @@ jobs:
if: always()
env:
CARGO_BUILD_RUSTDOCFLAGS: "--deny warnings"
run: cargo doc --profile ${{ env.build-type }} --document-private-items --no-deps --locked
run: cargo doc --profile ${{ env.build-type }} --document-private-items --no-deps

- name: Shear
if: always()
Expand All @@ -114,16 +114,16 @@ jobs:
fi

artifact_x86=linux-enable-ir-emitter-${version}-${buildtype}-x86-64.tar.gz
echo "ARTIFACT_X86=$artifact_x86" >> "$GITHUB_ENV"
echo "ARTIFACT_X86=$artifact_x86" >> "$GITHUB_OUTPUT"
tar -czvf ${artifact_x86} -C target/${buildtype} linux-enable-ir-emitter

- name: Upload x86
id: upload-x86
if: ${{ steps.build.outcome == 'success' }}
uses: actions/upload-artifact@v6
with:
name: ${{ env.ARTIFACT_X86 }}
path: ${{ env.ARTIFACT_X86 }}
name: ${{ steps.create-artifacts.outputs.ARTIFACT_X86 }}
path: ${{ steps.create-artifacts.outputs.ARTIFACT_X86 }}
if-no-files-found: error

- name: Save cached cargo dependencies
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ jobs:
MESSAGE_FILE: ./message.md
steps:
- name: Check if in PR
uses: insurgent-lab/is-in-pr-action@v0.2.0
id: is-pr
id: pr-number
env:
GH_TOKEN: ${{ github.token }}
run: |
pr_number=$(gh pr view --json number -q .number || echo '')
echo "PR_NUMBER=$pr_number" >> $GITHUB_OUTPUT

- name: Create PR comment
id: create-comment
if: ${{ steps.is-pr.outputs.result == 'true' }}
if: ${{ steps.pr-number.outputs.PR_NUMBER != '' }}
run: |
function outcome_emoji() {
if [ "$1" == "success" ]; then
Expand Down Expand Up @@ -59,3 +63,4 @@ jobs:
comment-tag: bot_comment
mode: recreate
file-path: ${{ env.MESSAGE_FILE }}
pr-number: ${{ steps.pr-number.outputs.PR_NUMBER }}
Loading