diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..81990ba77 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,110 @@ +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' + - 'tools/**' + - '**/Makefile' + - '.github/workflows/build.yml' + pull_request: + branches: + - master + paths: + - 'OpenCL/**.h' + - 'OpenCL/**.cl' + - 'include/**.h' + - 'src/**.c' + - 'tools/**' + - '**/Makefile' + - '.github/workflows/build.yml' + +jobs: + build-linux: + strategy: + fail-fast: false + matrix: + shared: [0, 1] + name: Build Linux (${{ matrix.shared == 0 && 'Static' || 'Shared' }}) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build + env: + SHARED: ${{ matrix.shared }} + run: make + - name: Generate artifacts + uses: actions/upload-artifact@v3 + with: + name: hashcat-linux-${{ matrix.shared == 0 && 'static' || 'shared' }} + path: ${{ env.include_paths }} + + build-macos: + strategy: + fail-fast: false + matrix: + shared: [0, 1] + name: Build macOS (${{ matrix.shared == 0 && 'Static' || 'Shared' }}) + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Build + env: + SHARED: ${{ matrix.shared }} + run: make + - name: Generate artifacts + uses: actions/upload-artifact@v3 + with: + name: hashcat-macos-${{ matrix.shared == 0 && 'static' || 'shared' }} + path: ${{ env.include_paths }} + + build-windows: + strategy: + fail-fast: false + matrix: + shared: [0, 1] + name: Build Windows (${{ matrix.shared == 0 && 'Static' || 'Shared' }}) + runs-on: windows-latest + steps: + - name: Install libiconv + uses: msys2/setup-msys2@v2 + with: + update: true + install: | + gcc + git + libiconv + libiconv-devel + make + - uses: actions/checkout@v3 + - name: Build + shell: msys2 {0} + env: + SHARED: ${{ matrix.shared }} + run: make + - name: Generate artifacts + uses: actions/upload-artifact@v3 + with: + name: hashcat-windows-${{ matrix.shared == 0 && 'static' || 'shared' }} + path: ${{ env.include_paths }} diff --git a/README.md b/README.md index d102d505c..927523f97 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ Refer to [BUILD.md](BUILD.md) for instructions on how to build **hashcat** from Tests: -Travis | Appveyor | Coverity ------- | -------- | -------- -[![Hashcat Travis Build status](https://travis-ci.org/hashcat/hashcat.svg?branch=master)](https://travis-ci.org/hashcat/hashcat) | [![Hashcat Appveyor Build status](https://ci.appveyor.com/api/projects/status/github/hashcat/hashcat?branch=master&svg=true)](https://ci.appveyor.com/project/jsteube/hashcat) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/11753/badge.svg)](https://scan.coverity.com/projects/hashcat) +Travis | Appveyor | Coverity | GitHub Actions +------ | -------- | -------- | -------------- +[![Hashcat Travis Build status](https://travis-ci.org/hashcat/hashcat.svg?branch=master)](https://travis-ci.org/hashcat/hashcat) | [![Hashcat Appveyor Build status](https://ci.appveyor.com/api/projects/status/github/hashcat/hashcat?branch=master&svg=true)](https://ci.appveyor.com/project/jsteube/hashcat) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/11753/badge.svg)](https://scan.coverity.com/projects/hashcat) | [![Hashcat GitHub Actions Build status](https://github.com/hashcat/hashcat/actions/workflows/build.yml/badge.svg)](https://github.com/hashcat/hashcat/actions/workflows/build.yml) ### Contributing ### diff --git a/docs/changes.txt b/docs/changes.txt index b646fcc20..a3e754257 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -123,6 +123,7 @@ - Terminal: Increased size of hash name column in `--help` and `--identify` options. - Modules: New LUKS v1 modules (29511-29543) which do not use `module_hash_binary_parse` to get data from containers anymore (use new tool `tools/luks2hashcat.py`). - Modules: Renamed old LUKS module into LUKS v1 and added suffix *legacy* (14600). +- Workflow: Added basic workflow for GitHub Actions. * changes v6.2.4 -> v6.2.5