From: <al...@us...> - 2023-03-19 18:44:25
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse-utils. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse-utils/ci/bb96b0153fc2accd12a7b2c3d814cc2ea730dd17/ The following commit(s) were added to refs/heads/master by this push: new bb96b01 Arki55/features/t9 GitHub build checks utils ==> master (#1) new 03350d4 Merge /u/arki55/fuse-utils/ branch arki55/github-workflows into master bb96b01 is described below commit bb96b0153fc2accd12a7b2c3d814cc2ea730dd17 Author: Miroslav Ďurčík <743...@us...> AuthorDate: Wed Mar 8 21:48:20 2023 +0100 Arki55/features/t9 GitHub build checks utils ==> master (#1) * arki55/features/T9-github-build-checks-utils build: GitHub worflow files for building Fuse Utils on multiple platforms: 1) Linux, running on Ubuntu Latest - Builds and packs Libspectrum with all libs enabled + real glib - Builds Fuse Utils with previously built Libspectrum, which is saved as a workflow artefact - Only one build configuration configured 2) Win 32, running on Windows latest, using Cygwin environment and libraries - Builds and packs Libspectrum with all libs enabled + fake glib - Builds Fuse Utils with previously built Libspectrum, which is saved as a workflow artefact - Only one build configuration configured 3) MacOS, running on MacOS latest, using brew libraries - Build and packs Libspectrum with all libs enabled + real glib - Builds Fuse Utils with previously built Libspectrum, which is saved as a workflow artefact - Only one build configuration configured Any compile errors stop workflow. Warnings while building do not. This might be changed later if needed. --- .github/scripts/in_config.sh | 8 ++ .github/workflows/build_linux.yml | 30 +++++++ .github/workflows/build_linux_sub.yml | 77 +++++++++++++++++ .github/workflows/build_macos.yml | 30 +++++++ .github/workflows/build_macos_sub.yml | 99 ++++++++++++++++++++++ .github/workflows/build_windows.yml | 29 +++++++ .github/workflows/build_windows_sub.yml | 144 ++++++++++++++++++++++++++++++++ 7 files changed, 417 insertions(+) diff --git a/.github/scripts/in_config.sh b/.github/scripts/in_config.sh new file mode 100755 index 0000000..d4c15e4 --- /dev/null +++ b/.github/scripts/in_config.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "Looking for line '$1' .." +lines1=(`cat "./configure.out" | grep -c "$1"`) +if [[ "$lines1" -ne "1" ]]; then + echo "Error: Line $1 not found!" + exit 1 +fi +echo "Line '$1' was found." diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 0000000..44d7b4b --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,30 @@ +name: Fuse Utils For Linux +run-name: Build Fuse Utils for Linux / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, real glib) + name: "Libspectrum lib (Linux)" + uses: arki55/fuse-libspectrum/.github/workflows/build_linux_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-utils + # repo name is taken from var.LIBSPECTRUM_REPO + + +######################################### +### SUPPORTED Linux configurations ### +######################################### + + # Default build without any configure params + utils-default: + name: "Fuse Utils Default (Linux)" + needs: [libspectrum] + uses: ./.github/workflows/build_linux_sub.yml + with: + name: Default + dependencies: "libaudiofile-dev" + configure_params: "" diff --git a/.github/workflows/build_linux_sub.yml b/.github/workflows/build_linux_sub.yml new file mode 100644 index 0000000..de0609d --- /dev/null +++ b/.github/workflows/build_linux_sub.yml @@ -0,0 +1,77 @@ +# Reusable workflow for all Linux builds +name: Fuse Utils For Linux +run-name: Build Fuse Utils for Linux / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + +jobs: + build: + name: Build Utils + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + shell: bash + steps: + - name: (1) Install dependencies + if: ${{ inputs.dependencies }} + run: | + sudo apt-get update + sudo apt-get install -y ${{ inputs.dependencies }} + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-linux-fuse-utils + path: libspectrum + + - name: (4) Install libspectrum from artefact + run: | + # Extract (-x) files into /usr/local + sudo tar --directory / -xvf libspectrum/libspectrum-installed-linux.tar + echo "Done" + + - name: (5) Autogen.sh + run: ./autogen.sh + + - name: (6) Configure for Linux + run: | + ./configure ${{ inputs.configure_params }} \ + |& tee ./configure.out + + - name: (7) Verify output from configure + # Most of the tested strings are common for all Linux builds + run: | + .github/scripts/in_config.sh "The Fuse utils are ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libjpeg support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "libspectrum's internal GLib replacement: no" + + - name: (7) Make + run: make + + - name: (8) Install + run: sudo make install + + - name: (9) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml new file mode 100644 index 0000000..99fdc5f --- /dev/null +++ b/.github/workflows/build_macos.yml @@ -0,0 +1,30 @@ +name: Fuse Utils For MacOS +run-name: Build Fuse Utils for MacOS / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, real glib) + name: "Libspectrum lib (MacOS)" + uses: arki55/fuse-libspectrum/.github/workflows/build_macos_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-utils + # repo name is taken from var.LIBSPECTRUM_REPO + + +######################################### +### SUPPORTED MacOS configurations ### +######################################### + + # Default build without any configure params + utils-default: + name: "Fuse Utils Default (Utils)" + needs: [libspectrum] + uses: ./.github/workflows/build_macos_sub.yml + with: + name: Default + dependencies: "" + configure_params: "" diff --git a/.github/workflows/build_macos_sub.yml b/.github/workflows/build_macos_sub.yml new file mode 100644 index 0000000..f8f707a --- /dev/null +++ b/.github/workflows/build_macos_sub.yml @@ -0,0 +1,99 @@ +# Reusable workflow for all MacOS builds +name: Fuse Utils For MacOS +run-name: Build Fuse Utils for MacOS / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + +jobs: + build: + name: Build Utils + runs-on: macos-latest + timeout-minutes: 15 + defaults: + run: + shell: bash + steps: + - name: (1) Prepare environment + run: | + echo -n "Current directory: " + pwd + ls -la + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Install dependencies + run: | + echo "Inspect if brew installed .." + brew doctor || true + + echo "Upgrade bash (fix |& ) .." + brew install bash + which -a bash + bash --version + sudo sh -c 'echo /usr/local/bin/bash >> /etc/shells' + + echo "Installing dependencies .." + brew install \ + automake \ + audiofile \ + bzip2 \ + libgcrypt \ + glib \ + libxml2 \ + ${{ inputs.dependencies }} + autoreconf -i + + - name: (4) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-macos-fuse-utils + path: libspectrum + + - name: (5) Install libspectrum from artefact + run: | + # Extract (-x) files into /usr/local + sudo tar --directory / -xvf libspectrum/libspectrum-installed-macos.tar + echo "Done" + + - name: (6) Autogen.sh + run: ./autogen.sh + + - name: (7) Configure for MacOS + run: | + ./configure ${{ inputs.configure_params }} \ + |& tee ./configure.out + + - name: (8) Verify output from configure + # Most of the tested strings are common for all MacOS builds + run: | + .github/scripts/in_config.sh "The Fuse utils are ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libjpeg support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "libspectrum's internal GLib replacement: no" + + - name: (9) Make + run: make + + - name: (10) Install + run: sudo make install + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 0000000..8d3835b --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,29 @@ +name: Fuse Utils For Windows +run-name: Build Fuse Utils for Windows / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, fake glib) + name: "Libspectrum lib (Windows)" + uses: arki55/fuse-libspectrum/.github/workflows/build_windows_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-utils + # repo name is taken from var.LIBSPECTRUM_REPO + +######################################## +### SUPPORTED Windows configurations ### +######################################## + + # Win32 / 1 + utils-win32-default: + name: "Fuse Utils Default (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + name: Default + dependencies: "mingw64-i686-libxml2" + configure_params: "" diff --git a/.github/workflows/build_windows_sub.yml b/.github/workflows/build_windows_sub.yml new file mode 100644 index 0000000..af03900 --- /dev/null +++ b/.github/workflows/build_windows_sub.yml @@ -0,0 +1,144 @@ +# Reusable workflow for all Windows builds +name: Fuse Utils For Windows +run-name: Build Fuse Utils for windows / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + +jobs: + build: + name: Build Utils + runs-on: windows-latest + timeout-minutes: 15 + env: + CYGWIN_NOWINPATH: 1 + + # Custom build libraries + CPPFLAGS: "-I/usr/local/i686-w64-mingw32/include" + LDFLAGS: "-L/usr/local/i686-w64-mingw32/lib" + PKG_CONFIG_LIBDIR: "/usr/local/i686-w64-mingw32/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" + steps: + - name: (1) Prepare environment + run: | + cd ${GITHUB_WORKSPACE} + + echo "Adjust autocrlf in git.." + git config --global core.autocrlf input + + echo -n "Current directory: " + pwd + ls -la + shell: bash + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Install Cygwin (32 bit) with libs + uses: cygwin/cygwin-install-action@master + with: + platform: x86 + packages: | + autoconf \ + automake \ + bison \ + flex \ + gcc-core \ + gcc-g++ \ + gettext-devel \ + libtool \ + make \ + mingw64-i686-bzip2 \ + mingw64-i686-gcc-core \ + mingw64-i686-gcc-g++ \ + mingw64-i686-libgcrypt \ + mingw64-i686-libgpg-error \ + mingw64-i686-libjpeg-turbo \ + mingw64-i686-libpng \ + mingw64-i686-win-iconv \ + mingw64-i686-winpthread \ + mingw64-i686-zlib \ + mingw64-i686-audiofile \ + pkg-config \ + ${{ inputs.dependencies }} + + - name: (4) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-windows-fuse-utils + path: libspectrum + + - name: (5) Install libspectrum from artefact + run: | + cd ${GITHUB_WORKSPACE} + # Extract (-x) files into /usr/local (cannot work with root /) + mkdir /usr/local/i686-w64-mingw32 || true + tar --directory /usr/local/i686-w64-mingw32 -xvf libspectrum/libspectrum-installed-windows.tar + echo "Done" + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (6) Autogen.sh + run: | + cd ${GITHUB_WORKSPACE} + echo "Running autogen.sh .." + ./autogen.sh + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (7) Configure for Windows + run: | + cd ${GITHUB_WORKSPACE} + echo "Running configure .." + ./configure \ + --build=i686-pc-cygwin \ + --host=i686-w64-mingw32 \ + --prefix=/usr/local/i686-w64-mingw32 \ + --disable-static \ + ${{ inputs.configure_params }} \ + |& tee ./configure.out + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (8) Verify output from configure + # Most of the tested strings are common for all Windows builds + run: | + cd ${GITHUB_WORKSPACE} + + .github/scripts/in_config.sh "The Fuse utils are ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libjpeg support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "libspectrum's internal GLib replacement: yes" + + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (9) Make + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make .." + make + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (10) Install + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make dist-win32-dir .." + make install dist-win32-dir + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." |