build: Show info on configure log, and try gathering DLLs on Windows #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
refToBuild: | |
description: 'Branch, tag or commit SHA1 to build' | |
required: true | |
type: string | |
jobs: | |
ubuntu-gcc-x86: | |
runs-on: ubuntu-20.04 | |
name: "Linux Ubuntu, arch x86" | |
container: | |
image: ubuntu:20.04 | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
TZ: Etc/UTC | |
steps: | |
- name: Install GIT | |
run: | | |
# install GIT, as without it checkout would use REST API | |
apt update | |
apt install -y \ | |
git | |
- name: Checkout code at latest head | |
if: "${{ inputs.refToBuild == '' }}" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout code at requested ref | |
if: "${{ inputs.refToBuild != '' }}" | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.refToBuild }} | |
fetch-depth: 0 | |
- name: Set ownership | |
run: | | |
# this is to fix GIT not liking owner of the checkout dir | |
chown -R $(id -u):$(id -g) $PWD | |
- name: Install dependencies | |
run: | | |
# add i386 dependencies | |
dpkg --add-architecture i386 | |
apt update | |
apt install -y \ | |
gcc-multilib g++-multilib lib32z1 libc6-dev | |
apt install -y \ | |
build-essential autoconf libtool make | |
- name: Autoreconf | |
run: autoreconf -ivf | |
- name: Configure | |
env: | |
CFLAGS: "-m32" | |
CXXFLAGS: "-m32" | |
LDFLAGS: "-m32" | |
PKG_CONFIG_PATH: "/usr/lib/i386-linux-gnu/pkgconfig" | |
run: | | |
mkdir -p release; cd release | |
../configure | |
- name: Build executable | |
run: | | |
cd release | |
make V=1 | |
- name: Copy for package | |
run: | | |
cd release | |
# Get version marking from C header | |
PKG_VERSION=$(sed -n 's/^#define[ ]\+PACKAGE_VERSION "\([^"]\+\)"$/\1/p' src/config.h | head -n 1 | tr '.' '_') | |
make V=1 DESTDIR=$PWD/pkg install | |
echo "PKG_NAME=le_disasm-$PKG_VERSION-ubuntu-patch" >> $GITHUB_ENV | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PKG_NAME }} | |
path: release/pkg/** | |
windows-msys2-x86: | |
name: "Windows MSYS2, arch x86" | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Checkout code at latest head | |
if: "${{ inputs.refToBuild == '' }}" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout code at requested ref | |
if: "${{ inputs.refToBuild != '' }}" | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.refToBuild }} | |
fetch-depth: 0 | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW32 | |
update: true | |
install: >- | |
git | |
unzip | |
mingw-w64-i686-toolchain | |
mingw-w64-i686-autotools | |
- name: Autoreconf | |
run: autoreconf -ivf | |
- name: Configure | |
id: cofigure-app | |
env: | |
CFLAGS: "-m32" | |
CXXFLAGS: "-m32" | |
LDFLAGS: "-m32" | |
run: | | |
mkdir -p release; cd release | |
../configure | |
- name: Upload Configure logs | |
if: failure() && steps.cofigure-app.outcome != 'success' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cofigure-logs | |
path: release/config.log | |
retention-days: 10 | |
- name: Build executable | |
run: | | |
cd release | |
make V=1 | |
- name: Copy for package | |
run: | | |
cd release | |
# Get version marking from C header | |
PKG_VERSION=$(sed -n 's/^#define[ ]\+PACKAGE_VERSION "\([^"]\+\)"$/\1/p' src/config.h | head -n 1 | tr '.' '_') | |
make V=1 DESTDIR=$PWD/pkg install | |
echo "PKG_NAME=le_disasm-$PKG_VERSION-win32-patch" >> $GITHUB_ENV | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PKG_NAME }} | |
path: release/pkg/** |