diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44fa387e0..4dbbda26f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,53 +41,36 @@ on: - '.github/workflows/build.yml' jobs: - build-linux: + build: strategy: fail-fast: false matrix: - shared: [0, 1] - name: Build Linux (${{ matrix.shared == 0 && 'Static' || 'Shared' }}) - runs-on: ubuntu-latest + include: + - os: ubuntu-latest + os_name: linux + shared: 0 + - os: ubuntu-latest + os_name: linux + shared: 1 + - os: macos-latest + os_name: macos + shared: 0 + - os: macos-latest + os_name: macos + shared: 1 + - os: windows-latest + os_name: windows + shared: 0 + - os: windows-latest + os_name: windows + shared: 1 + name: Build ${{ matrix.os_name }} (${{ matrix.shared == 0 && 'Static' || 'Shared' }}) + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Build - env: - SHARED: ${{ matrix.shared }} - run: make - - name: Generate artifacts - uses: actions/upload-artifact@v4 - 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@v4 - - name: Build - env: - SHARED: ${{ matrix.shared }} - run: make - - name: Generate artifacts - uses: actions/upload-artifact@v4 - 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 + - name: Install dependencies (Windows only) + if: matrix.os_name == 'windows' uses: msys2/setup-msys2@v2 with: update: true @@ -97,14 +80,22 @@ jobs: libiconv libiconv-devel make - - uses: actions/checkout@v4 + - name: Build + if: matrix.os_name == 'windows' shell: msys2 {0} env: SHARED: ${{ matrix.shared }} run: make + + - name: Build + if: matrix.os_name != 'windows' + env: + SHARED: ${{ matrix.shared }} + run: make + - name: Generate artifacts uses: actions/upload-artifact@v4 with: - name: hashcat-windows-${{ matrix.shared == 0 && 'static' || 'shared' }} + name: hashcat-${{ matrix.os_name }}-${{ matrix.shared == 0 && 'static' || 'shared' }} path: ${{ env.include_paths }}