Skip to content

Update README.md

Update README.md #5

Workflow file for this run

name: Build Project
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
PROJECT: changeme
AUTHOR: hugsy
REPO: ${{ env.AUTHOR }}/${{ env.PROJECT }}

Check failure on line 7 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build Project

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 7, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.AUTHOR
VERBOSE: "1"
CMAKE_FLAGS: "-DDEBUG=ON -DBUILD_TOOLKIT=ON"
on: [push, pull_request]
jobs:
build:
name: "${{ matrix.os }}/${{ matrix.platform }}/${{ matrix.configuration }}"
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'ubuntu-latest']
platform: ['x64']
configuration: ['RelWithDebInfo']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Sets Windows specific environment variables
shell: powershell
run: |
echo "NB_CPU=$env:NUMBER_OF_PROCESSORS" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if: matrix.os == 'windows-latest'
- name: Sets Linux specific environment variables
run: |
echo "NB_CPU=$(grep -c ^processor /proc/cpuinfo)" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: cpp
if: matrix.os == 'ubuntu-latest'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: ${{ matrix.platform }}
if: matrix.os == 'windows-latest'
- name: Prepare Windows environment
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$true
- name: Prepare Linux environment
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
true
- name: Build pwn++ library
run: |
mkdir ./build
cd ./build
cmake .. ${{ env.CMAKE_FLAGS }}
cmake --build . --verbose --parallel ${{ env.NB_CPU }} --config ${{ matrix.configuration }} --target tests
cd ..
- name: Run tests
run: |
cd build/tests
ctest --parallel=${{ env.NB_CPU }} --extra-verbose --cfg=${{ matrix.configuration }}
cd ../..
- name: Perform CodeQL Analysis
if: matrix.os == 'ubuntu-latest'
uses: github/codeql-action/analyze@v1
- name: Prepare artifact
run: |
mkdir artifact
cd build
cmake --install . --config ${{ matrix.configuration }} --prefix ../artifact --verbose
cd ..
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.PROJECT }}_${{ env.GITHUB_REF_SLUG }}_${{ matrix.os }}_${{ matrix.platform }}_${{ env.GITHUB_SHA_SHORT }}
path: artifact/
- name: Notify on success
if: ${{ success() }}
env:
COMMIT_URL: "https://github.com/${{ env.REPO }}/commit/${{ env.GITHUB_SHA_SHORT }}"
RUN_URL: "https://github.com/${{ env.REPO }}/actions/runs/${{ github.run_id }}"
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: SUCCESS building `${{ env.REPO }}` for `${{ matrix.os }}-${{ matrix.platform }}`/${{ matrix.configuration }}
description: |
[Job #${{ github.run_number }}] The CI build `${{ env.GITHUB_SHA_SHORT }}` initiated by ${{ env.GITHUB_ACTOR }} on ${{ env.GITHUB_REPOSITORY }} succeeded:
● Commit ${{ env.COMMIT_URL }}
● Branch `${{ env.GITHUB_REF_SLUG }}`
● Platform ${{ matrix.os }}-${{ matrix.platform }}
● Configuration ${{ matrix.configuration }}
● Run details: ${{ env.RUN_URL }}
color: 0x00ff00
username: ${{ github.actor }} via GithubBot
avatar_url: ${{ github.actor.avatar_url }}
- name: Notify on test failure
if: ${{ failure() }}
env:
COMMIT_URL: "https://github.com/${{ env.REPO }}/commit/${{ env.GITHUB_SHA_SHORT }}"
RUN_URL: "https://github.com/${{ env.REPO }}/actions/runs/${{ github.run_id }}"
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
title: FAILED building `${{ env.REPO }}` for `${{ matrix.os }}-${{ matrix.platform }}`/${{ matrix.configuration }}
description: |
[Job #${{ github.run_number }}] The CI build `${{ env.GITHUB_SHA_SHORT }}` initiated by ${{ env.GITHUB_ACTOR }} on ${{ env.GITHUB_REPOSITORY }} failed:
● Commit ${{ env.COMMIT_URL }}
● Branch `${{ env.GITHUB_REF_SLUG }}`
● Platform ${{ matrix.os }}-${{ matrix.platform }}
● Configuration ${{ matrix.configuration }}
● Run details: ${{ env.RUN_URL }}
color: 0xff0000
username: ${{ github.actor }} via GithubBot
avatar_url: ${{ github.actor.avatar_url }}