Use 64-bit counters for amplifier keyspace #1
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: Build | |
| env: | |
| include_paths: | | |
| charsets/ | |
| docs/ | |
| extra/ | |
| layouts/ | |
| masks/ | |
| modules/ | |
| OpenCL/ | |
| rules/ | |
| example* | |
| hashcat* | |
| libhashcat* | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - v* | |
| paths: | |
| - 'OpenCL/**.h' | |
| - 'OpenCL/**.cl' | |
| - 'include/**.h' | |
| - 'src/**.c' | |
| - 'src/**.mk' | |
| - 'tools/**' | |
| - '**/Makefile' | |
| - '.github/workflows/build.yml' | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'OpenCL/**.h' | |
| - 'OpenCL/**.cl' | |
| - 'include/**.h' | |
| - 'src/**.c' | |
| - 'src/**.mk' | |
| - 'tools/**' | |
| - '**/Makefile' | |
| - '.github/workflows/build.yml' | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| shared: [0, 1] | |
| include: | |
| - os: ubuntu-latest | |
| os_name: Linux | |
| os_name_lowercase: linux | |
| - os: macos-latest | |
| os_name: macOS | |
| os_name_lowercase: macos | |
| - os: windows-latest | |
| os_name: Windows | |
| os_name_lowercase: windows | |
| name: Build ${{ matrix.os_name }} (${{ matrix.shared == 0 && 'Static' || 'Shared' }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} | |
| repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} | |
| - name: Install dependencies (Windows only) | |
| if: matrix.os_name_lowercase == 'windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| update: true | |
| install: | | |
| gcc | |
| git | |
| libiconv | |
| libiconv-devel | |
| make | |
| python | |
| - name: Build (Windows) | |
| if: matrix.os_name_lowercase == 'windows' | |
| shell: msys2 {0} | |
| env: | |
| SHARED: ${{ matrix.shared }} | |
| run: make | |
| - name: Build (Linux/macOS) | |
| if: matrix.os_name_lowercase != 'windows' | |
| env: | |
| SHARED: ${{ matrix.shared }} | |
| run: make | |
| - name: Run --help and save to docs/hashcat-help.md | |
| if: matrix.os_name_lowercase == 'linux' && matrix.shared == 0 | |
| env: | |
| SHARED: ${{ matrix.shared }} | |
| run: | | |
| echo 'These docs are automatically generated by Github Actions see .github/workflows/build.yml \' > docs/hashcat-help.md | |
| echo 'All manual changes will be overwritten!' >> docs/hashcat-help.md | |
| echo '```' >> docs/hashcat-help.md | |
| ./hashcat --help >> docs/hashcat-help.md | |
| echo '```' >> docs/hashcat-help.md | |
| - name: Run --example-hashes and save to docs/hashcat-example-hashes.md | |
| if: matrix.os_name_lowercase == 'linux' && matrix.shared == 0 | |
| env: | |
| SHARED: ${{ matrix.shared }} | |
| run: | | |
| echo 'These docs are automatically generated by Github Actions see .github/workflows/build.yml \' > docs/hashcat-example-hashes.md | |
| echo 'All manual changes will be overwritten!' >> docs/hashcat-example-hashes.md | |
| echo '| Hash-mode | Hash-name | Kernels | Example |' >> docs/hashcat-example-hashes.md | |
| echo '|:-----------|:-----------|:-----------|:---------------|' >> docs/hashcat-example-hashes.md | |
| ./hashcat --example-hashes --machine-readable --quiet | python3 docs/hashcat-example-hashes_machine-readable2md.py >> docs/hashcat-example-hashes.md | |
| - name: Commit changes to docs | |
| if: matrix.os_name_lowercase == 'linux' && matrix.shared == 0 | |
| env: | |
| SHARED: ${{ matrix.shared }} | |
| run: | | |
| # https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-using-the-built-in-token | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add docs/hashcat-help.md | |
| git add docs/hashcat-example-hashes.md | |
| if ! git diff --staged --quiet; then | |
| if [ "$GITHUB_EVENT_NAME" = "push" ]; then | |
| git commit -m "Automatically updated docs/hashcat-help.md or docs/hashcat-example-hashes.md (by Github Action)" | |
| git push | |
| else | |
| echo "docs/hashcat-help.md or docs/hashcat-example-hashes.md are not up-to-date:" | |
| echo "..." | |
| git diff --staged | cat | |
| echo "..." | |
| echo "this will be updated automatically when merged into master" | |
| fi | |
| else | |
| echo "No need to update docs/hashcat-help.md or docs/hashcat-example-hashes.md" | |
| fi | |
| - name: Generate artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hashcat-${{ matrix.os_name_lowercase }}-${{ matrix.shared == 0 && 'static' || 'shared' }} | |
| path: ${{ env.include_paths }} |