fix #9
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: test | |
| on: | |
| - push | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - x86_64_windows_gnu | |
| - aarch64_windows_gnu | |
| - x86_64_macos_none | |
| - aarch64_macos_none | |
| - x86_64_linux_gnu | |
| - x86_64_linux_musl | |
| - aarch64_linux_gnu | |
| - aarch64_linux_musl | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: mlugg/setup-zig@v2 | |
| - uses: jiro4989/setup-nim-action@v2 | |
| with: | |
| nim-version: 2.2.x | |
| nim-install-directory: nim | |
| parent-nim-install-directory: /opt | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: nimble install | |
| - run: | | |
| case "${{ matrix.target }}" in | |
| x86_64_windows_gnu) | |
| nimble build --os:windows --cpu:amd64 --passC:"-target x86_64-windows-gnu" --passL:"-target x86_64-windows-gnu" --passL:"-lws2_32 -lwinmm" --dynlibOverride:dl -d:mingw -d:useMalloc | |
| ;; | |
| aarch64_windows_gnu) | |
| nimble build --os:windows --cpu:arm64 --passC:"-target aarch64-windows-gnu" --passL:"-target aarch64-windows-gnu" --passL:"-lws2_32 -lwinmm" --dynlibOverride:dl -d:mingw -d:useMalloc | |
| ;; | |
| x86_64_macos_none) | |
| nimble build --os:macos --cpu:amd64 --passC:"-target x86_64-macos-none" --passL:"-target x86_64-macos-none" -d:noSignalHandler -d:useMalloc --dynlibOverride:ssl --dynlibOverride:crypto | |
| ;; | |
| aarch64_macos_none) | |
| nimble build --os:macos --cpu:arm64 --passC:"-target aarch64-macos-none" --passL:"-target aarch64-macos-none" -d:noSignalHandler -d:useMalloc --dynlibOverride:ssl --dynlibOverride:crypto | |
| ;; | |
| x86_64_linux_gnu) | |
| nimble build --os:linux --cpu:amd64 --passC:"-target x86_64-linux-gnu" --passL:"-target x86_64-linux-gnu" | |
| ;; | |
| x86_64_linux_musl) | |
| nimble build --os:linux --cpu:amd64 --passC:"-target x86_64-linux-musl" --passL:"-target x86_64-linux-musl" | |
| ;; | |
| aarch64_linux_gnu) | |
| nimble build --os:linux --cpu:arm64 --passC:"-target aarch64-linux-gnu" --passL:"-target aarch64-linux-gnu" | |
| ;; | |
| aarch64_linux_musl) | |
| nimble build --os:linux --cpu:arm64 --passC:"-target aarch64-linux-musl" --passL:"-target aarch64-linux-musl" | |
| ;; | |
| esac | |
| - run: ls -al | |
| - run: | | |
| if [ -f "./cross" ]; then | |
| mv ./cross ./cross-${{ matrix.target }} | |
| elif [ -f "./cross.exe" ]; then | |
| mv ./cross.exe ./cross-${{ matrix.target }}.exe | |
| else | |
| echo "Binary not found" | |
| exit 1 | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cross-${{ matrix.target }} | |
| path: ./cross-${{ matrix.target }}* | |
| - run: file ./cross-${{ matrix.target }}* || true | |
| - run: | | |
| BINARY=$(ls ./cross-${{ matrix.target }}* | head -1) | |
| echo "Analyzing binary: $BINARY" | |
| objdump -f "$BINARY" || true | |
| objdump -h "$BINARY" || true | |
| objdump -p "$BINARY" || true | |
| readelf -h "$BINARY" || true | |
| ldd "$BINARY" || true | |
| strings "$BINARY" | head -20 || true |