Skip to content

Basic ARM builds

Basic ARM builds #59

Workflow file for this run

on:
push:
paths-ignore:
- "**/*.md"
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- "**/*.md"
release:
types: [published]
jobs:
buildLinuxArm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Build Native Linux for ARM
run: |
docker run --rm --privileged tonistiigi/binfmt --install all
docker run --rm -v $(pwd):/workspace -w /workspace multiarch/debian-debootstrap:arm64-buster sh -c "
apt update &&
apt install -y make gcc g++ unzip &&
make -f Makefile.gnu all"
- uses: actions/upload-artifact@v4
with:
path: Dist/
name: arm-dist
retention-days: 1
buildLinux:
runs-on: ubuntu-latest
container: debian:buster # Using debian buster environment for glibc backwards compatibility, see https://github.com/Yellow-Dog-Man/FreeImage/pull/12
steps:
- uses: actions/checkout@v4
- name: Build Native Linux
run: |
apt update
apt install -y make gcc g++ unzip
make all
- uses: actions/upload-artifact@v4
with:
path: Dist/
name: linux-dist
retention-days: 1
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25c
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Build Arm/Android
run: |
ndk-build NDK_LIBS_OUT=./android/libs NDK_OUT=./android/obj
- uses: actions/upload-artifact@v4
with:
path: android/
name: android-dist
retention-days: 1
buildWindows:
needs: [buildLinux, buildLinuxArm]
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Build Solution
run: |
msbuild.exe FreeImage.2017.vcxproj /p:Configuration=Release /p:Platform=x64
msbuild.exe FreeImage.2017.vcxproj /p:Configuration=Release /p:Platform=Win32
- uses: actions/upload-artifact@v4
with:
path: Dist/x32
name: win32-dist
- uses: actions/upload-artifact@v4
with:
path: Dist/x64
name: win64-dist
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_TOKEN }}
- name: Download Native Libraries
uses: actions/download-artifact@v4
with:
path: native/
- name: File systems suck where are we
run: tree
- name: Build
working-directory: ./Wrapper/FreeImage.NET/cs/Library
run: msbuild.exe Library.csproj /p:Configuration=Release
- name: Pack
shell: cmd
working-directory: ./Wrapper/FreeImage.NET/cs/Library
run: nuget pack Library.csproj -OutputDirectory nupkgs -Version 0.1.0 -Properties version="0.1.0";Configuration=Release
- uses: actions/upload-artifact@v4
with:
path: Wrapper/FreeImage.NET/cs/Library/nupkgs
name: nuget-dist
upload-release:
needs: [buildsWindows, buildLinux, buildLinuxArm]
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: ./dist
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_TOKEN }}
- name: Push Nuget
run: nuget push ./dist/nuget-dist/*.nupkg -ApiKey ${{ secrets.NUGET_TOKEN }} -Source https://api.nuget.org/v3/index.json
- name: Prep Archives
run: |
tar -czvf linux-dist.tar.gz ./dist/linux-dist
tar -czvf android-dist.tar.gz ./dist/android-dist
tar -czvf arm-dist.tar.gz ./dist/arm-dist
zip -r win32-dist.zip ./dist/win32-dist
zip -r win64-dist.zip ./dist/win64-dist
- name: Upload Tarbells
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.tar.gz
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload Zips
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.zip
tag: ${{ github.ref }}
overwrite: true
file_glob: true