Skip to content

github: Upgrade to Ubuntu 24.04. #294

github: Upgrade to Ubuntu 24.04.

github: Upgrade to Ubuntu 24.04. #294

Workflow file for this run

name: build
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *' # monthly
jobs:
build-native:
runs-on: windows-2022
strategy:
matrix:
target: [mingw64, mingw32]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Cache Downloads
id: cache-downloads
uses: actions/cache@v4
with:
path: |
downloads/*.7z
downloads/*.zip
key: ${{ runner.os }}-${{ hashFiles('ci/dependencies.ps1') }}
- run: Get-Host | Select-Object Version
- run: python -m pip install gcovr
- name: Build
run: .\ci\build.ps1 -target ${{ matrix.target }} -coverage
- name: codecov
uses: codecov/codecov-action@v4
if: "!(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))"
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: cobertura.xml
functionalities: search
fail_ci_if_error: true
verbose: false
- name: Upload artifact
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: drmingw-${{ matrix.target }}
path: build/mingw??/drmingw-*.7z
if-no-files-found: error
build-cross-gcc:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- run: sudo dpkg --add-architecture i386
- run: sudo apt-get update -qq
- run: sudo apt-get install -yqq --install-recommends mingw-w64 ninja-build cmake xinit xvfb wine wine64 wine32:i386
- run: ci/build.sh
build-cross-clang:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Cache Downloads
id: cache-downloads
uses: actions/cache@v4
with:
path: downloads/*.xz
key: ${{ runner.os }}-${{ hashFiles('ci/dependencies-clang.sh') }}
- run: sudo dpkg --add-architecture i386
- run: sudo apt-get update -qq
- run: sudo apt-get install -yqq --install-recommends ninja-build cmake xinit xvfb wine wine64 wine32:i386
- run: ci/build-clang.sh
- name: Upload artifact
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: drmingw-clang
path: build/*-clang/drmingw-*.7z
if-no-files-found: error
# See https://github.com/actions/upload-release-asset
release:
# https://github.community/t/trigger-job-on-tag-push-only/18076/2
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: [build-native, build-cross-clang]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- uses: actions/download-artifact@v4
id: download
with:
path: artifacts
- run: Get-ChildItem -Recurse "${{ steps.download.outputs.download-path }}"
- name: Asset names
id: assets
run: |
$asset32 = Get-Item "${{ steps.download.outputs.download-path }}\drmingw-mingw32\mingw32\*.7z"
$asset64 = Get-Item "${{ steps.download.outputs.download-path }}\drmingw-mingw64\mingw64\*.7z"
"mingw32-path=$($asset32.FullName)" >> $Env:GITHUB_OUTPUT
"mingw64-path=$($asset64.FullName)" >> $Env:GITHUB_OUTPUT
$asset64arm = Get-Item "${{ steps.download.outputs.download-path }}\drmingw-clang\aarch64-w64-mingw32-clang\*.7z"
"mingw64-arm-path=$($asset64arm.FullName)" >> $Env:GITHUB_OUTPUT
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
gh release create --draft --title "${{ github.ref_name }}" --generate-notes "${{ github.ref_name }}"
${{ steps.assets.outputs.mingw32-path }}
${{ steps.assets.outputs.mingw64-path }}
${{ steps.assets.outputs.mingw64-arm-path }}