Skip to content

libmodplug: Fix build with recent clang. #474

libmodplug: Fix build with recent clang.

libmodplug: Fix build with recent clang. #474

Workflow file for this run

#
# On push to trunk or manual workflow call, build touched or requested
# pkgpaths and sync the built binary packages to the BINPKG_SITES cache.
#
name: update-binpkg
on:
push:
branches:
- trunk
workflow_dispatch:
inputs:
pkgpaths:
description: 'List of package paths to build'
required: true
jobs:
what-changed:
runs-on: ubuntu-latest
outputs:
bootstrap-hash: ${{ steps.what-changed.outputs.bootstrap-hash }}
pkgbuild-files: ${{ steps.vars.outputs.pkgpaths }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Calculate changes
id: what-changed
uses: ./.github/actions/what-changed
- name: Set variables based on push or workflow call
id: vars
run: |
if [ -n "${{ inputs.pkgpaths }}" ]; then
pkgpaths="${{ inputs.pkgpaths }}"
else
pkgpaths="${{ steps.what-changed.outputs.pkgbuild-files }}"
fi
echo "pkgpaths=${pkgpaths}" >> ${GITHUB_OUTPUT}
build-native:
needs: what-changed
strategy:
fail-fast: false
matrix:
platform:
- name: macos-13-x86_64
os: macos-13
- name: macos-15-arm64
os: macos-15
- name: ubuntu-24.04-x86_64
os: ubuntu-24.04
- name: cygwin-2022-x86_64
os: windows-2022
runs-on: ${{ matrix.platform.os }}
steps:
- name: Set autocrlf
if: runner.os == 'Windows'
run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Check for cached bootstrap kit
id: bootstrap-kit
uses: actions/cache@v4
with:
key: bootstrap-kit-${{ matrix.platform.name }}-${{ needs.what-changed.outputs.bootstrap-hash }}
# Must live in checkout dir due to actions/cache limitations.
path: bootstrap.tar
- name: Install Cygwin
uses: egor-tensin/setup-cygwin@v4
if: runner.os == 'Windows'
with:
packages: gcc-g++
- name: Configure SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.CI_SSH_KEY }}
known_hosts: ${{ secrets.CI_KNOWN_HOSTS }}
- name: Bootstrap if required
if: steps.bootstrap-kit.outputs.cache-hit != 'true'
shell: bash
run: ./.github/scripts/bootstrap.sh
- name: Build requested packages
uses: ./.github/actions/pkgbuild
with:
platform: ${{ matrix.platform.name }}
pkgbuild-files: ${{ needs.what-changed.outputs.pkgbuild-files }}
binpkg-sites: http://cipkg.dreckly.dev/packages/${{ matrix.platform.name }}
- name: Upload packages
if: always()
shell: bash
env:
CI_SSH_USER: ${{ secrets.CI_SSH_USER }}
CI_SSH_HOST: ${{ secrets.CI_SSH_HOST }}
CI_REMOTE_DIR: ${{ secrets.CI_PACKAGE_DIR }}/${{ matrix.platform.name }}/
run: ./.github/scripts/upload.sh
jenkins:
needs: what-changed
uses: ./.github/workflows/jenkins.yml
with:
bootstrap-hash: ${{ needs.what-changed.outputs.bootstrap-hash }}
github-sha: ${{ github.sha }}
pkgbuild-files: ${{ needs.what-changed.outputs.pkgbuild-files }}
upload-pkgs: true
secrets:
CI_JENKINS_TRIGGER_URL: ${{ secrets.CI_JENKINS_TRIGGER_URL }}
CI_JENKINS_TOKEN: ${{ secrets.CI_JENKINS_TOKEN }}
CI_PACKAGE_DIR: ${{ secrets.CI_PACKAGE_DIR }}
CI_SSH_HOST: ${{ secrets.CI_SSH_HOST }}
CI_SSH_USER: ${{ secrets.CI_SSH_USER }}
build-qemu:
needs: what-changed
strategy:
fail-fast: false
matrix:
platform:
- name: freebsd-14.2-x86_64
os: freebsd
arch: x86-64
version: '14.2'
- name: openbsd-7.6-x86_64
os: openbsd
arch: x86-64
version: '7.6'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.CI_SSH_KEY }}
known_hosts: ${{ secrets.CI_KNOWN_HOSTS }}
- name: Check for cached bootstrap kit
id: bootstrap-kit
uses: actions/cache@v4
with:
key: bootstrap-kit-${{ matrix.platform.name }}-${{ needs.what-changed.outputs.bootstrap-hash }}
# Must live in checkout dir due to actions/cache limitations.
path: bootstrap.tar
# Note that this action can only be called once in the same job, so we
# need to do everything in one go.
- name: Run jobs inside VM
uses: cross-platform-actions/action@v0.27.0
env:
RUN_BOOTSTRAP: ${{ steps.bootstrap-kit.outputs.cache-hit != 'true' }}
BINPKG_SITES: http://cipkg.dreckly.dev/packages/${{ matrix.platform.name }}
PKGBUILD_FILES: ${{ needs.what-changed.outputs.pkgbuild-files }}
with:
environment_variables: RUN_BOOTSTRAP BINPKG_SITES PKGBUILD_FILES
operating_system: ${{ matrix.platform.os }}
architecture: ${{ matrix.platform.arch }}
version: ${{ matrix.platform.version }}
cpu_count: 4
shell: bash
run: |
if ${RUN_BOOTSTRAP}; then
.github/scripts/bootstrap.sh
fi
.github/scripts/pkgbuild.sh
- name: Archive build logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs-${{ matrix.platform.name }}
path: wrkdir
- name: Upload packages
if: always()
env:
CI_SSH_USER: ${{ secrets.CI_SSH_USER }}
CI_SSH_HOST: ${{ secrets.CI_SSH_HOST }}
CI_REMOTE_DIR: ${{ secrets.CI_PACKAGE_DIR }}/${{ matrix.platform.name }}/
run: ./.github/scripts/upload.sh