Skip to content

Commit

Permalink
Include dependencies licenses in release
Browse files Browse the repository at this point in the history
  • Loading branch information
rapperskull committed Feb 29, 2024
1 parent 59bfde6 commit 6877d75
Showing 1 changed file with 64 additions and 18 deletions.
82 changes: 64 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -53,18 +75,22 @@ 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 }}
path: artifacts

build-linux:
runs-on: ubuntu-latest
needs: Init
needs: [Init, copy-licenses]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -76,18 +102,22 @@ 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
path: artifacts

build-macos:
runs-on: macos-latest
needs: Init
needs: [Init, copy-licenses]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -99,18 +129,22 @@ 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
path: artifacts

build-freebsd:
runs-on: ubuntu-latest
needs: Init
needs: [Init, copy-licenses]
env:
SYSROOT_PATH: /opt/cross-freebsd-13
steps:
Expand All @@ -133,18 +167,22 @@ 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
path: artifacts

build-openbsd:
runs-on: ubuntu-latest
needs: Init
needs: [Init, copy-licenses]
env:
SYSROOT_PATH: /opt/cross-openbsd-7
steps:
Expand All @@ -167,18 +205,22 @@ 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
path: artifacts

build-netbsd:
runs-on: ubuntu-latest
needs: Init
needs: [Init, copy-licenses]
env:
SYSROOT_PATH: /opt/cross-netbsd-9
steps:
Expand All @@ -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
Expand Down

0 comments on commit 6877d75

Please sign in to comment.