diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index de11ee0..af1e4bb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,9 +25,31 @@ jobs: name: tag path: tag + copy-licenses: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + - name: Copy licenses + run: | + mkdir licenses + cp LICENSE.TXT licenses/ + for dep in deps/*/ + do + dep_name=$(basename ${dep}) + mkdir licenses/${dep_name} + cp deps/${dep_name}/LICENSE* licenses/${dep_name}/ + done + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: LICENSES + path: licenses + build-windows: runs-on: windows-latest - needs: Init + needs: [Init, copy-licenses] env: POWERSHELL_TELEMETRY_OPTOUT: 1 strategy: @@ -53,10 +75,14 @@ jobs: - name: Build working-directory: build run: cmake --build . --config ${{ matrix.configuration }} -j $env:NUMBER_OF_PROCESSORS + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -vb build\${{ matrix.configuration }}\extract-xiso.exe, LICENSE.TXT artifacts + mv -vb build\${{ matrix.configuration }}\extract-xiso.exe artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-${{ matrix.artifact_os }}-${{ matrix.configuration }} @@ -64,7 +90,7 @@ jobs: build-linux: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] steps: - uses: actions/checkout@v4 with: @@ -76,10 +102,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-linux @@ -87,7 +117,7 @@ jobs: build-macos: runs-on: macos-latest - needs: Init + needs: [Init, copy-licenses] steps: - uses: actions/checkout@v4 with: @@ -99,10 +129,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(sysctl -n hw.ncpu) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-macos @@ -110,7 +144,7 @@ jobs: build-freebsd: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] env: SYSROOT_PATH: /opt/cross-freebsd-13 steps: @@ -133,10 +167,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-freebsd @@ -144,7 +182,7 @@ jobs: build-openbsd: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] env: SYSROOT_PATH: /opt/cross-openbsd-7 steps: @@ -167,10 +205,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-openbsd @@ -178,7 +220,7 @@ jobs: build-netbsd: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] env: SYSROOT_PATH: /opt/cross-netbsd-9 steps: @@ -201,10 +243,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-netbsd