build(deps): Bump rustix from 0.37.19 to 0.37.25 #179
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
################################################## | |
# Name: thumbs.yaml | |
# Description: | |
# A Workflow that posts Thumbs Up/Down comments. | |
################################################## | |
name: Thumbs Up/Down | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
actions: read | |
checks: read | |
deployments: read | |
statuses: read | |
env: | |
ORGANISATION: ${{ github.repository_owner }} | |
PROJECT: ${{ github.event.repository.name }} | |
# Works on pushes or PRs | |
BRANCH_NAME_CURRENT: ${{ github.head_ref || github.ref_name }} | |
BRANCH_NAME_DEFAULT: ${{ github.event.repository.default_branch }} | |
jobs: | |
wait_linter: | |
name: Wait for Linter | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
- id: wait_for_linter | |
name: Wait for Linter (${{ matrix.os }}) | |
uses: fountainhead/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
checkName: GitHub Super-Linter (${{ matrix.os }}) | |
timeoutSeconds: 1800 | |
intervalSeconds: 30 | |
outputs: | |
conclusion: ${{ steps.wait_for_linter.outputs.conclusion }} | |
wait_build: | |
name: Wait for Build | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
toolchain: stable | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
toolchain: stable | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
toolchain: stable | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
toolchain: stable | |
- target: aarch64-unknown-linux-musl | |
os: ubuntu-latest | |
toolchain: stable | |
- target: x86_64-pc-windows-gnu | |
os: ubuntu-latest | |
toolchain: stable | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
toolchain: stable | |
steps: | |
- id: wait_for_build | |
name: Wait for Build (${{ matrix.target }}, ${{ matrix.os }}, ${{ matrix.toolchain }}) | |
uses: fountainhead/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
checkName: Build (${{ matrix.target }}, ${{ matrix.os }}, ${{ matrix.toolchain }}) | |
timeoutSeconds: 1800 | |
intervalSeconds: 30 | |
- id: matrix_conclusion | |
name: Store Matrix conclusions | |
shell: bash | |
run: | | |
CONCLUSION="${{ steps.wait_for_build.outputs.conclusion }}" | |
echo "Conclusion: ${CONCLUSION}" | |
CONCLUSIONS_JSON=${CONCLUSIONS_JSON:-"{}"} | |
echo "Conclusions JSON: ${CONCLUSIONS_JSON}" | |
CONCLUSIONS_JSON=$(echo "${CONCLUSIONS_JSON}" | \ | |
jq -c \ | |
--arg TARGET "${{ matrix.target }}" \ | |
--arg CONCLUSION "${{ steps.wait_for_build.outputs.conclusion }}" \ | |
'. + {($TARGET): $CONCLUSION}') | |
echo "Conclusions JSON: ${CONCLUSIONS_JSON}" | |
echo "CONCLUSIONS_JSON=${CONCLUSIONS_JSON}" >> "${GITHUB_OUTPUT}" | |
mkdir artifacts | |
echo "${CONCLUSIONS_JSON}" >> "artifacts/${{ matrix.target }}-conclusions.json" | |
- id: upload_artifacts | |
name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: conclusions | |
path: artifacts | |
comment: | |
name: Thumbs | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
needs: | |
- wait_linter | |
- wait_build | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
- id: download_artifacts | |
name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: conclusions | |
path: conclusions | |
- id: thumbs | |
name: Determine Thumbs Up/Down | |
run: | | |
sudo apt-get install -y jq tree | |
tree conclusions | |
THUMBS="UP" | |
for FILE in conclusions/*.json; | |
do | |
TARGET=$(jq -r 'to_entries[] | select(.value) | .key' "$FILE") | |
CONCLUSION=$(jq -r 'to_entries[] | select(.value != "success") | .value' "$FILE") | |
echo "Target: $TARGET" | |
echo "Conclusion: $CONCLUSION" | |
if [[ -n $CONCLUSION ]]; | |
then | |
THUMBS="DOWN" | |
break | |
fi | |
done | |
echo "THUMBS=$THUMBS" >> "${GITHUB_OUTPUT}" | |
echo "Thumbs: $THUMBS" | |
- id: pr_comment_thumbs_up | |
name: PR Comment (Thumbs Up) | |
if: ${{ steps.thumbs.outputs.THUMBS == 'UP' }} | |
uses: exercism/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
config-file: .github/pr-comments/thumbs_up.yaml | |
template-variables: | | |
{ | |
"id": "${{ github.sha }}-thumbs", | |
"onCreate": "create", | |
"onUpdate": "recreate" | |
} | |
- id: pr_comment_thumbs_down | |
name: PR Comment (Thumbs Down) | |
if: ${{ steps.thumbs.outputs.THUMBS == 'DOWN' }} | |
uses: exercism/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
config-file: .github/pr-comments/thumbs_down.yaml | |
template-variables: | | |
{ | |
"id": "${{ github.sha }}-thumbs", | |
"onCreate": "create", | |
"onUpdate": "recreate" | |
} |