From: <al...@us...> - 2023-03-19 18:41:15
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/602af5a4044c52d8a9edd08f51fc9f035c43aa94/ commit 602af5a4044c52d8a9edd08f51fc9f035c43aa94 Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 16:47:23 2023 +0100 arki55/features/T9-github-build-checks (libspectrum) build: New reusable workflow for building and testing libspectrum on Linux. - At the end it zips all files (including compiled binaries) and uplouads it a workflow artifact. - Executed on push (commits), pull_request (merge commit). Plus called from FUSE and Fuse Utils repositories (to provide libspectrum library). - Repository is used current or as specified by github repo variable LIBSPECTRUM_REPO (must be set in FUse app's and Fuse Util's github repo). - Build configuration used by this script: Platform: Linux zlib support: yes bzip2 support: yes libgcrypt support: yes libaudiofile support: yes Internal GLib replacement: no --- .github/workflows/build_linux.yml | 110 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 0000000..f09bbb9 --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,110 @@ +name: Libspectrum for Linux (1) +run-name: Build and test Libspectrum for Linux (1) [ all libs, real glib ] / ${{ github.actor }} / + +on: + # Executed upon each commit pushed + push: + pull_request: + # Called from fuse app, fuse utils repos + workflow_call: + inputs: + path: + type: string + required: false + default: '.' + branch: + type: string + required: false + # Repo is taken from var.LIBSPECTRUM_REPO, cannot be passed as input. + +jobs: + build: + name: Build & Test + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + shell: bash + working-directory: ${{ inputs.path || '.' }} + env: + # Support push and call triggers, set env.variables + LIBSPECTRUM_REPO: ${{ vars.LIBSPECTRUM_REPO || '' }} + LIBSPECTRUM_BRANCH: ${{ inputs.branch || '' }} + LIBSPECTRUM_PATH: ${{ inputs.path || '.' }} + steps: + - name: (1) Prepare environment + run: | + echo -n "Current directory: " + pwd + ls -la + + echo "Libspectrum repo: $LIBSPECTRUM_REPO" + echo "Libspectrum branch: $LIBSPECTRUM_BRANCH" + echo "Libspectrum path: $LIBSPECTRUM_PATH" + + - name: (2) Check out repository code + uses: actions/checkout@v3 + with: + repository: ${{ env.LIBSPECTRUM_REPO }} + ref: ${{ env.LIBSPECTRUM_BRANCH }} + path: ${{ env.LIBSPECTRUM_PATH }} + + - name: (3) Install dependencies + run: | + pwd + ls -la + echo "Installing dependencies .." + sudo apt install -y libaudiofile-dev + + - name: (4) Autogen.sh + run: | + echo "Running autogen.sh .." + ./autogen.sh + + - name: (5) Configure for linux (real glib) + run: | + echo "Running configure .." + ./configure | tee ./configure.out + + - name: (6) Verify output from configure + run: | + .github/scripts/in_config.sh "libspectrum is ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "bzip2 support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "Internal GLib replacement: no" + + - name: (7) Make + run: | + echo "Running make .." + make + + - name: (8) Install + run: | + echo "Running make install .." + sudo make install + + - name: (9) Run tests + run: | + echo "Bulding and running tests .." + make check + + - name: (10) Upload generated files + # Need to pack files to maintain permissions (+x mainly) + run: | + tar -cvf \ + libspectrum-compiled-linux.tar \ + --exclude=".git" "libspectrum-compiled-linux.tar" \ + --ignore-failed-read \ + . + + - uses: actions/upload-artifact@v3 + with: + name: libspectrum-compiled-linux + path: | + libspectrum-compiled-linux.tar + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." |