From 0c49ac231323efc808e885c3ca06090228e66feb Mon Sep 17 00:00:00 2001 From: Andrey Litvitski Date: Thu, 12 Nov 2026 21:18:49 +0300 Subject: [PATCH 1/3] strip release binaries --- .github/workflows/ci.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fa6a380..966b4374 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,28 +52,22 @@ jobs: run: cabal test all - name: Collect executable - if: runner.os != 'Windows' run: | mkdir -p artifacts - exe="$(find dist-newstyle \ - -type f \ - -path "*/x/openleetcode/build/openleetcode/openleetcode" \ - | head -n 1)" + cabal install exe:openleetcode \ + --installdir=artifacts \ + --install-method=copy \ + --overwrite-policy=always \ + --enable-executable-stripping - cp "$exe" "artifacts/${{ matrix.artifact }}" + - name: Finalize artifact + if: runner.os != 'Windows' + run: mv artifacts/openleetcode "artifacts/${{ matrix.artifact }}" - - name: Collect executable + - name: Finalize artifact if: runner.os == 'Windows' shell: pwsh - run: | - New-Item -ItemType Directory -Force -Path artifacts - $exe = Get-ChildItem -Path dist-newstyle -Recurse -Filter "openleetcode.exe" | - Where-Object { - $_.FullName -like "*\x\openleetcode\build\openleetcode\openleetcode.exe" - } | - Select-Object -First 1 - - Copy-Item $exe.FullName "artifacts/${{ matrix.artifact }}.exe" + run: Move-Item artifacts/openleetcode.exe "artifacts/${{ matrix.artifact }}.exe" - name: Smoke test if: runner.os != 'Windows' From 09e7be929035fca4e1842252ec0942a0217c6e9b Mon Sep 17 00:00:00 2001 From: Andrey Litvitski Date: Thu, 12 Nov 2026 21:22:55 +0300 Subject: [PATCH 2/3] yo --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 966b4374..6ee46ae5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,12 +46,6 @@ jobs: run: cabal update - name: Build - run: cabal build all - - - name: Tests - run: cabal test all - - - name: Collect executable run: | mkdir -p artifacts cabal install exe:openleetcode \ @@ -69,6 +63,9 @@ jobs: shell: pwsh run: Move-Item artifacts/openleetcode.exe "artifacts/${{ matrix.artifact }}.exe" + - name: Tests + run: cabal test all + - name: Smoke test if: runner.os != 'Windows' run: | From cb9dfc07aae0a6187752be91e829d102c976c7e6 Mon Sep 17 00:00:00 2001 From: Andrey Litvitski Date: Thu, 12 Nov 2026 21:33:07 +0300 Subject: [PATCH 3/3] lil more --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ee46ae5..028a583f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: run: cabal update - name: Build + shell: bash run: | mkdir -p artifacts cabal install exe:openleetcode \ @@ -60,8 +61,8 @@ jobs: - name: Finalize artifact if: runner.os == 'Windows' - shell: pwsh - run: Move-Item artifacts/openleetcode.exe "artifacts/${{ matrix.artifact }}.exe" + shell: bash + run: mv artifacts/openleetcode.exe "artifacts/${{ matrix.artifact }}.exe" - name: Tests run: cabal test all @@ -73,9 +74,8 @@ jobs: - name: Smoke test if: runner.os == 'Windows' - shell: pwsh - run: | - .\artifacts\${{ matrix.artifact }}.exe --version + shell: bash + run: ./artifacts/${{ matrix.artifact }}.exe --version - name: Upload artifacts uses: actions/upload-artifact@v4