add a test workflow #18
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: [ "main", "add-ci-test" ] | |
pull_request: | |
branches: [ "main", "add-ci-test" ] | |
jobs: | |
build: | |
name: ${{matrix.platform.name}} | |
runs-on: ${{matrix.platform.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
# - { name: Windows VS2019, ls: dir, os: windows-2019, disp: type, sample: pgn_samples, testpgn: pgn_samples\\first.pgn, analyzedpgn: .\\pgn_samples\\first.analyzed.pgn, bin: .\\apgn.exe } | |
# - { name: Windows VS2022, ls: dir, os: windows-2022, disp: type, sample: pgn_samples, testpgn: pgn_samples\\first.pgn, analyzedpgn: .\\pgn_samples\\first.analyzed.pgn, bin: .\\apgn.exe } | |
# - { name: Windows-Clang, ls: dir, os: windows-latest, disp: type, sample: pgn_samples, testpgn: pgn_samples\\first.pgn, analyzedpgn: .\\pgn_samples\\first.analyzed.pgn, bin: .\\apgn.exe, flags: CC=clang CXX=clang++ } | |
- { name: Windows-GCC, ls: dir, os: windows-latest, disp: type, sample: pgn_samples, testpgn: pgn_samples\\first.pgn, analyzedpgn: .\\pgn_samples\\first.analyzed.pgn, bin: .\\apgn.exe, flags: CC=gcc CXX=g++ } | |
- { name: Linux-GCC, ls: ls, os: ubuntu-latest, disp: cat, sample: ./pgn_samples, testpgn: ./pgn_samples/first.pgn, analyzedpgn: ./pgn_samples/first.analyzed.pgn, bin: ./apgn } | |
- { name: Linux-Clang, ls: ls, os: ubuntu-latest, disp: cat, sample: ./pgn_samples, testpgn: ./pgn_samples/first.pgn, analyzedpgn: ./pgn_samples/first.analyzed.pgn, bin: ./apgn, flags: CC=clang CXX=clang++ } | |
# - { name: MacOS-XCode, ls: ls, os: macos-latest, disp: cat, sample: ./pgn_samples, testpgn: ./pgn_samples/first.pgn, analyzedpgn: ./pgn_samples/first.analyzed.pgn, bin: ./apgn } | |
steps: | |
- uses: actions/checkout@v3 | |
- name: build for -> ${{matrix.platform.os}} | |
run: make ${{matrix.platform.flags}} -j4 | |
- name: ready executable for execution | |
run: chmod a+rx ${{matrix.platform.bin}} | |
- name: ready first.pgn for reading | |
run: chmod a+r ${{matrix.platform.testpgn}} | |
- name: run test | |
run: ${{matrix.platform.bin}} -depth 5 ${{matrix.platform.testpgn}} | |
- name: show files in current directory | |
run: ${{matrix.platform.ls}} | |
- name: show files in sample pgn folder | |
run: ${{matrix.platform.ls}} ${{matrix.platform.sample}} | |
- name: display results | |
run: ${{matrix.platform.disp}} ${{matrix.platform.analyzedpgn}} | |
# - name: Create release test files | |
# run: gh release create ${{github.ref_name}}-${{matrix.platform.name}} ${{matrix.platform.analyzedpgn}} --title "${{github.ref_name}}-${{matrix.platform.name}}" --notes "test files for ${{github.ref_name}}" --draft=true --prerelease=true | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |