Add support for ipopt solver #163
This file contains hidden or 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
# MIT License | |
# Copyright (c) 2021 Viacheslav Poturaev | |
name: Comment on PR with lines changed | |
on: | |
pull_request: | |
# Cancel the workflow in progress in newer build is about to start. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
line-count: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
path: pr | |
- name: Checkout base code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.base.sha }} | |
path: base | |
- name: Count Lines Of Code | |
id: loc | |
run: | | |
curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.3/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz | |
sccdiff_hash=$(git hash-object ./sccdiff) | |
[ "$sccdiff_hash" == "ae8a07b687bd3dba60861584efe724351aa7ff63" ] || (echo "::error::unexpected hash for sccdiff, possible tampering: $sccdiff_hash" && exit 1) | |
OUTPUT=$(cd pr && ../sccdiff -basedir ../base) | |
echo "${OUTPUT}" | |
OUTPUT="${OUTPUT//$'\n'/%0A}" | |
echo "::set-output name=diff::$OUTPUT" | |
- name: Comment Code Lines | |
continue-on-error: true | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
header: LOC | |
message: | | |
### Lines Of Code | |
${{ steps.loc.outputs.diff }} |