From a9a67cde24c7484c8ffd5edc4bf7caeddef9767a Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sun, 7 Sep 2025 18:12:41 -0400 Subject: [PATCH 1/7] feat(ci): add uci compliance check bench: 2517656 --- .github/workflows/uci_compliance.yml | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/uci_compliance.yml diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml new file mode 100644 index 0000000..6e01b26 --- /dev/null +++ b/.github/workflows/uci_compliance.yml @@ -0,0 +1,53 @@ +name: UCI Compliance +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + matrix: + runs-on: [ubuntu-22.04] + rust: [stable, nightly] + build-type: [debug, release] + runs-on: ubuntu-22.04 + steps: + - name: Rust ${{ matrix.rust }} + run: rustup default ${{ matrix.rust }} + - uses: actions/checkout@v4 + with: + lfs: true + - name: Install just + uses: extractions/setup-just@v2 + + - name: Checkout fastchess + uses: actions/checkout@v4 + with: + repository: Disservin/fastchess + path: fast-chess + + - name: Cache fastchess binary + id: cache-fastchess + uses: actions/cache@v4 + with: + path: fast-chess/fastchess + key: fastchess-${{ runner.os }}-${{ hashFiles('fast-chess/Makefile') }} + + - name: Build fastchess + if: steps.cache-fastchess.outputs.cache-hit != 'true' + run: | + make -j + working-directory: fast-chess + + - name: Build byte-knight + run: just build ${{ matrix.build-type }} + + - name: Run UCI compliance tests + run: | + chmod +x fast-chess/fastchess + ./fast-chess/fastchess --compliance ../target/${{ matrix.build-type }}/byte-knight From ef9f2ba36e70a36dc70774087213a377634425d4 Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sun, 7 Sep 2025 18:17:06 -0400 Subject: [PATCH 2/7] fix(ci): relative path to engine when checking --- .github/workflows/uci_compliance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml index 6e01b26..215ac5e 100644 --- a/.github/workflows/uci_compliance.yml +++ b/.github/workflows/uci_compliance.yml @@ -50,4 +50,4 @@ jobs: - name: Run UCI compliance tests run: | chmod +x fast-chess/fastchess - ./fast-chess/fastchess --compliance ../target/${{ matrix.build-type }}/byte-knight + ./fast-chess/fastchess --compliance ./target/${{ matrix.build-type }}/byte-knight From ac70c954c9d4ad9aa8430e7cb4e106ed5a6d7126 Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sun, 7 Sep 2025 18:49:38 -0400 Subject: [PATCH 3/7] fix(ci): remove matrix for compliance check bench: 2517656 --- .github/workflows/uci_compliance.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml index 215ac5e..8e4b994 100644 --- a/.github/workflows/uci_compliance.yml +++ b/.github/workflows/uci_compliance.yml @@ -10,15 +10,10 @@ env: jobs: build: - strategy: - matrix: - runs-on: [ubuntu-22.04] - rust: [stable, nightly] - build-type: [debug, release] runs-on: ubuntu-22.04 steps: - - name: Rust ${{ matrix.rust }} - run: rustup default ${{ matrix.rust }} + - name: Rust stable + run: rustup default stable - uses: actions/checkout@v4 with: lfs: true @@ -45,9 +40,9 @@ jobs: working-directory: fast-chess - name: Build byte-knight - run: just build ${{ matrix.build-type }} + run: just build release - name: Run UCI compliance tests run: | chmod +x fast-chess/fastchess - ./fast-chess/fastchess --compliance ./target/${{ matrix.build-type }}/byte-knight + ./fast-chess/fastchess --compliance ./target/release/byte-knight From 6854f2ca40e8ac0a8dc9c8c4317ac408a6c60ebb Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sat, 27 Sep 2025 16:24:51 -0400 Subject: [PATCH 4/7] chore: use clang to build fastchess --- .github/workflows/uci_compliance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml index 8e4b994..eec620b 100644 --- a/.github/workflows/uci_compliance.yml +++ b/.github/workflows/uci_compliance.yml @@ -36,7 +36,7 @@ jobs: - name: Build fastchess if: steps.cache-fastchess.outputs.cache-hit != 'true' run: | - make -j + make -j CXX=clang++ working-directory: fast-chess - name: Build byte-knight From 3af690b35a23cbdd533a31e4a966c47854732cdf Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sat, 27 Sep 2025 18:46:25 -0400 Subject: [PATCH 5/7] chore(ci): try to download fastchess instead of building it --- .github/workflows/uci_compliance.yml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml index eec620b..0109fab 100644 --- a/.github/workflows/uci_compliance.yml +++ b/.github/workflows/uci_compliance.yml @@ -20,24 +20,13 @@ jobs: - name: Install just uses: extractions/setup-just@v2 - - name: Checkout fastchess - uses: actions/checkout@v4 - with: - repository: Disservin/fastchess - path: fast-chess - - - name: Cache fastchess binary - id: cache-fastchess - uses: actions/cache@v4 - with: - path: fast-chess/fastchess - key: fastchess-${{ runner.os }}-${{ hashFiles('fast-chess/Makefile') }} - - - name: Build fastchess - if: steps.cache-fastchess.outputs.cache-hit != 'true' + - name: Download fastchess + shell: bash run: | - make -j CXX=clang++ - working-directory: fast-chess + gh -R Disservin/fastchess release download v1.6.0-alpha -p "fastchess-linux-x86-64.tar" + mkdir -p fast-chess + tar -xf fastchess-linux-x86-64.tar -C fast-chess + rm fastchess-linux-x86-64.tar - name: Build byte-knight run: just build release @@ -45,4 +34,4 @@ jobs: - name: Run UCI compliance tests run: | chmod +x fast-chess/fastchess - ./fast-chess/fastchess --compliance ./target/release/byte-knight + ./fast-chess/fastchess-linux/x86-64/fastchess --compliance ./target/release/byte-knight From ac07ad16df629f5e653558269682b285769bd52f Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sat, 27 Sep 2025 18:47:28 -0400 Subject: [PATCH 6/7] fix(ci): add missing github token --- .github/workflows/uci_compliance.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml index 0109fab..8d81f42 100644 --- a/.github/workflows/uci_compliance.yml +++ b/.github/workflows/uci_compliance.yml @@ -22,6 +22,8 @@ jobs: - name: Download fastchess shell: bash + env: + GH_TOKEN: ${{ github.token }} run: | gh -R Disservin/fastchess release download v1.6.0-alpha -p "fastchess-linux-x86-64.tar" mkdir -p fast-chess From 872e67ce5aada71215c6136f2614aec98b7e0d07 Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Sat, 27 Sep 2025 18:50:39 -0400 Subject: [PATCH 7/7] fix(ci): incorrect path for fastchess --- .github/workflows/uci_compliance.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/uci_compliance.yml b/.github/workflows/uci_compliance.yml index 8d81f42..cbf7f5d 100644 --- a/.github/workflows/uci_compliance.yml +++ b/.github/workflows/uci_compliance.yml @@ -35,5 +35,5 @@ jobs: - name: Run UCI compliance tests run: | - chmod +x fast-chess/fastchess - ./fast-chess/fastchess-linux/x86-64/fastchess --compliance ./target/release/byte-knight + chmod +x ./fast-chess/fastchess-linux-x86-64/fastchess + ./fast-chess/fastchess-linux-x86-64/fastchess --compliance ./target/release/byte-knight