Resources will be in /usr/share/scid/ following standard Linux direct… #8
Workflow file for this run
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
| name: Release Build | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup MSVC | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build Tcl library | |
| shell: cmd | |
| run: | | |
| mkdir tcltk | |
| cd tcltk | |
| git clone --depth=1 --branch core-8-6-branch https://github.com/tcltk/tcl.git | |
| cd tcl\win | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| nmake -f makefile.vc release OPTS=nomsvcrt INSTALLDIR=%GITHUB_WORKSPACE%\tcldir | |
| nmake -f makefile.vc install OPTS=nomsvcrt INSTALLDIR=%GITHUB_WORKSPACE%\tcldir | |
| - name: Build Tk library | |
| shell: cmd | |
| run: | | |
| cd tcltk | |
| git clone --depth=1 --branch core-8-6-branch https://github.com/tcltk/tk.git | |
| cd tk\win | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| nmake -f makefile.vc release OPTS=nomsvcrt INSTALLDIR=%GITHUB_WORKSPACE%\tcldir | |
| nmake -f makefile.vc install OPTS=nomsvcrt INSTALLDIR=%GITHUB_WORKSPACE%\tcldir | |
| - name: Configure CMake | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install -DTCL_INCLUDE_PATH=${{ github.workspace }}\tcldir\include ${{ github.workspace }} -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DWITH_MD_LIBRARY=OFF | |
| - name: Build ScidCommunity | |
| run: | | |
| cd build | |
| cmake --build . --config Release --target INSTALL | |
| - name: Build Stockfish | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| git clone --depth=1 --branch sf_17 https://github.com/official-stockfish/Stockfish.git stockfish | |
| cd stockfish\src | |
| cl /std:c++20 /DNDEBUG /DUSE_POPCNT /DUSE_AVX2 /DUSE_SSE41 /DUSE_SSSE3 /DUSE_SSE2 /GS- /MT /O2 /Oi /Ot /Oy /GL /EHsc *.cpp nnue/*.cpp nnue/features/*.cpp syzygy/*.cpp /link /LTCG /STACK:reserve=8388608 /OUT:stockfish.exe advapi32.lib | |
| copy stockfish.exe %GITHUB_WORKSPACE%\install\bin | |
| - name: Download Stockfish NNUE | |
| shell: bash | |
| run: | | |
| networks=$(grep -Eo "nn-[a-z0-9]+.nnue" stockfish/src/evaluate.h) | |
| for nnue in $networks; do | |
| echo "Downloading $nnue" | |
| curl -o install/bin/$nnue https://data.stockfishchess.org/nn/$nnue | |
| done | |
| - name: Package for distribution | |
| shell: cmd | |
| run: | | |
| cd install | |
| move bin engines | |
| copy %GITHUB_WORKSPACE%\tcldir\bin\*.dll bin | |
| xcopy /e %GITHUB_WORKSPACE%\tcldir\lib\tcl8 lib\tcl8\ | |
| xcopy /e %GITHUB_WORKSPACE%\tcldir\lib\tcl8.6 lib\tcl8.6\ | |
| xcopy /e %GITHUB_WORKSPACE%\tcldir\lib\tk8.6 lib\tk8.6\ | |
| - name: Create Windows ZIP | |
| run: | | |
| cd install | |
| Compress-Archive -Path * -DestinationPath ${{ github.workspace }}/scidCommunity-windows-x64.zip | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: scidCommunity-windows-x64 | |
| path: scidCommunity-windows-x64.zip | |
| build-linux-deb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Get version from tag | |
| id: get_version | |
| run: | | |
| if [[ $GITHUB_REF == refs/tags/* ]]; then | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| else | |
| VERSION="5.1.1" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Export version to env | |
| run: | | |
| echo "SCIDCOMMUNITY_VERSION=${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install tcl-dev tk-dev cmake build-essential | |
| - name: Configure and build | |
| run: | | |
| mkdir build && cd build | |
| cmake -DCPACK_GENERATOR=DEB \ | |
| -DCPACK_PACKAGE_NAME=scidcommunity \ | |
| -DCPACK_PACKAGE_VERSION=${{ steps.get_version.outputs.version }} \ | |
| -DCPACK_DEBIAN_PACKAGE_MAINTAINER="Hugh Whelan" \ | |
| -DCPACK_DEBIAN_PACKAGE_DEPENDS="tk8.6, libtcl8.6, libtk8.6" \ | |
| -DCPACK_DEBIAN_PACKAGE_LICENSE=GPL2 \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_CXX_FLAGS="-fno-exceptions -fno-rtti" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \ | |
| ${{ github.workspace }} | |
| make package | |
| - name: Upload DEB artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: scidCommunity-ubuntu-deb | |
| path: build/*.deb | |
| build-linux-rpm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Get version from tag | |
| id: get_version | |
| run: | | |
| if [[ $GITHUB_REF == refs/tags/* ]]; then | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| else | |
| VERSION="5.1.0" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Export version to env | |
| run: | | |
| echo "SCIDCOMMUNITY_VERSION=${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install tcl-dev tk-dev cmake build-essential rpm | |
| - name: Configure and build | |
| run: | | |
| mkdir build && cd build | |
| cmake -DCPACK_GENERATOR=RPM \ | |
| -DCPACK_PACKAGE_NAME=scidcommunity \ | |
| -DCPACK_PACKAGE_VERSION=${{ steps.get_version.outputs.version }} \ | |
| -DCPACK_RPM_PACKAGE_LICENSE=GPL2 \ | |
| -DCPACK_RPM_PACKAGE_REQUIRES="tk >= 8.6, tcl >= 8.6" \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_CXX_FLAGS="-fno-exceptions -fno-rtti" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \ | |
| ${{ github.workspace }} | |
| make package | |
| - name: Upload RPM artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: scidCommunity-linux-rpm | |
| path: build/*.rpm | |
| create-release: | |
| needs: [build-windows, build-linux-deb, build-linux-rpm] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifacts/scidCommunity-windows-x64/*.zip | |
| artifacts/scidCommunity-ubuntu-deb/*.deb | |
| artifacts/scidCommunity-linux-rpm/*.rpm | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |