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 e0134ae
Showing 1 changed file with 62 additions and 18 deletions.
80 changes: 62 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,29 @@ jobs:
name: tag
path: tag

copy-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 +73,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 +100,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 +127,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 +165,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 +203,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 +241,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 e0134ae

Please sign in to comment.