Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Update README.md

Update README.md #323

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: nttld/setup-ndk@v1
with:
ndk-version: r23
# This must be run as cmd /c to redirect output properly
# because powershell considers stderr an error and doesn't
# log it into the output properly
- name: build
id: build
continue-on-error: true
run: |
./.github-deps/change-to-shared-lib.ps1
cmd /c "build-release 2> errors.txt"
- name: Set error-log to var
uses: actions/github-script@v4
id: error-log
if: steps.build.outcome != 'success'
with:
script: |
const fs = require('fs');
return fs.readFileSync('errors.txt','utf8').toString();
result-encoding: string
- uses: actions/upload-artifact@v2
if: steps.build.outcome == 'success'
with:
name: imagemagick-7-android
path: jniLibs
- uses: mshick/add-pr-comment@v1
name: Add error log to PR
if: github.event_name == 'pull_request' && steps.build.outcome != 'success'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
message: |
The build just failed compilation :weary:
Here is the error log from the build :confused: Please check it and fix any problems in your code :open_mouth:
<details>
<summary>
Expand Stderr Log
</summary>
```
${{ steps.error-log.outputs.result }}
```
</details>
- name: Show build errors
if: steps.build.outcome != 'success'
uses: actions/github-script@v4
with:
script: |
const fs = require('fs');
console.log(fs.readFileSync('errors.txt','utf8').toString());
core.setFailed('Build failed');