Skip to content

Rescue extract-xiso from oblivion #161

Rescue extract-xiso from oblivion

Rescue extract-xiso from oblivion #161

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- '*.md'
- '*.yml'
pull_request:
paths-ignore:
- '*.md'
- '*.yml'
jobs:
Init:
runs-on: ubuntu-latest
steps:
- name: Create build tag
run: |
export BUILD_TAG=build-$(date -u +'%Y%m%d%H%M')
echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_ENV
echo -n $BUILD_TAG > tag
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
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, copy-licenses]
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
arch: [x86, x64]
include:
- arch: x86
platform: Win32
artifact_os: Win32
- arch: x64
platform: x64
artifact_os: Win64
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: CMake generate
run: |
mkdir build && cd build
cmake .. -A ${{ matrix.platform }}
- 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: |
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, copy-licenses]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: CMake generate
run: |
mkdir build && cd build
cmake ..
- 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: |
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, copy-licenses]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: CMake generate
run: |
mkdir build && cd build
cmake ..
- 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: |
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, copy-licenses]
env:
SYSROOT_PATH: /opt/cross-freebsd-13
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: FreeBSD toolchain setup
run: |
sudo apt-get -qq install clang lld && cd /tmp && \
wget -nv http://ftp.plusline.de/FreeBSD/releases/amd64/13.2-RELEASE/base.txz && \
mkdir -p $SYSROOT_PATH && cd $SYSROOT_PATH && \
tar -xf /tmp/base.txz ./lib/ ./usr/lib/ ./usr/include/ && \
cd $SYSROOT_PATH/usr/lib && \
find . -xtype l | xargs ls -l | grep ' /lib/' | awk -v sysroot="$SYSROOT_PATH" '{print "ln -sf " sysroot $11 " " $9}' | /bin/sh && \
rm -f /tmp/base.txz
- name: CMake generate
run: |
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../.github/data/BSD.cmake -DCMAKE_SYSTEM_NAME=FreeBSD -DTARGET=x86_64-pc-freebsd -DSYSROOT_PATH=$SYSROOT_PATH ..
- 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: |
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, copy-licenses]
env:
SYSROOT_PATH: /opt/cross-openbsd-7
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: OpenBSD toolchain setup
run: |
sudo apt-get -qq install clang lld && cd /tmp && \
wget -nv https://cdn.openbsd.org/pub/OpenBSD/7.4/amd64/base74.tgz \
https://cdn.openbsd.org/pub/OpenBSD/7.4/amd64/comp74.tgz && \
mkdir -p $SYSROOT_PATH && cd $SYSROOT_PATH && \
tar -xf /tmp/base74.tgz ./usr/lib/ ./usr/include/ && \
tar -xf /tmp/comp74.tgz ./usr/lib/ ./usr/include/ && \
rm -f /tmp/base74.tgz /tmp/comp74.tgz
- name: CMake generate
run: |
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../.github/data/BSD.cmake -DCMAKE_SYSTEM_NAME=OpenBSD -DTARGET=x86_64-pc-openbsd -DSYSROOT_PATH=$SYSROOT_PATH ..
- 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: |
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, copy-licenses]
env:
SYSROOT_PATH: /opt/cross-netbsd-9
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: NetBSD toolchain setup
run: |
sudo apt-get -qq install clang lld && cd /tmp && \
wget -nv https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/amd64/binary/sets/base.tar.xz \
https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/amd64/binary/sets/comp.tar.xz && \
mkdir -p $SYSROOT_PATH && cd $SYSROOT_PATH && \
tar -xf /tmp/base.tar.xz ./usr/lib/ ./usr/include/ && \
tar -xf /tmp/comp.tar.xz ./usr/lib/ ./usr/include/ && \
rm -f /tmp/base.tar.xz /tmp/comp.tar.xz
- name: CMake generate
run: |
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../.github/data/BSD.cmake -DCMAKE_SYSTEM_NAME=NetBSD -DTARGET=x86_64-pc-netbsd -DSYSROOT_PATH=$SYSROOT_PATH ..
- 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: |
mv -v build/extract-xiso artifacts
- uses: actions/upload-artifact@v4
with:
name: extract-xiso-netbsd
path: artifacts
Release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-macos, build-freebsd, build-openbsd, build-netbsd]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Create archives
run: |
for dir in dist/extract-xiso-*/
do
pushd ${dir}
zip_file="../$(basename ${dir} | tr '[:upper:]' '[:lower:]').zip"
echo "Create ${zip_file}"
zip -r ${zip_file} *
popd
done
- name: Get package info
run: |
echo "BUILD_TAG=$(cat dist/tag/tag)" >> $GITHUB_ENV
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.BUILD_TAG }}
draft: false
prerelease: false
fail_on_unmatched_files: true
files: dist/*.zip