-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 3.61 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: build
run-name: Build musl Linux libraries
on:
workflow_dispatch:
inputs:
alpine_ver:
description: 'alpine container image version number'
required: true
default: '3.18.3'
type: 'string'
cfltk_ver:
description: 'cfltk release version number'
required: true
default: '1.4.23'
type: 'string'
jobs:
lib_x86_64-alpine-linux-musl:
name: Linux musl amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build
shell: bash
run: |
mkdir -p "${{ github.workspace }}/artifacts"
docker run --rm --platform linux/amd64 -v "${{ github.workspace }}/artifacts":/output docker.io/alpine:${{ inputs.alpine_ver }} /bin/sh -c "apk add rust cargo git cmake make g++ pango-dev fontconfig-dev libxinerama-dev libxfixes-dev libxcursor-dev libpng-dev cairo-dev librsvg-dev wayland-dev wayland-protocols wayland-libs-client wayland-libs-cursor wayland-libs-egl libxkbcommon-dev zlib-dev wayland-libs-egl mesa-egl mesa-dev && git clone https://github.com/moalyousef/cfltk && cd cfltk && git checkout ${{ inputs.cfltk_ver }} && git submodule update --init --recursive && cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_SYSTEM_LIBPNG=OFF -DOPTION_USE_SYSTEM_LIBJPEG=OFF -DOPTION_USE_SYSTEM_ZLIB=OFF -DOPTION_USE_GL=OFF -DFLTK_BUILD_EXAMPLES=OFF -DFLTK_BUILD_TEST=OFF -DOPTION_USE_THREADS=ON -DOPTION_LARGE_FILE=ON -DOPTION_BUILD_HTML_DOCUMENTATION=OFF -DOPTION_BUILD_PDF_DOCUMENTATION=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON && cmake --build bin --parallel && cp bin/libcfltk.a ./bin/fltk/lib/ && cd bin/fltk && tar zcvf lib_x86_64-alpine-linux-${{ inputs.cfltk_ver }}-musl.tar.gz lib && cp lib_x86_64-alpine-linux-${{ inputs.cfltk_ver }}-musl.tar.gz /output/"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: lib_x86_64-alpine-linux-musl
path: ${{ github.workspace }}/artifacts
lib_aarch64-alpine-linux-musl:
name: Linux musl aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build
shell: bash
run: |
mkdir -p "${{ github.workspace }}/artifacts"
docker run --rm --platform linux/arm64 -v "${{ github.workspace }}/artifacts":/output docker.io/alpine:${{ inputs.alpine_ver }} /bin/sh -c "apk add rust cargo git cmake make g++ pango-dev fontconfig-dev libxinerama-dev libxfixes-dev libxcursor-dev libpng-dev cairo-dev librsvg-dev wayland-dev wayland-protocols wayland-libs-client wayland-libs-cursor wayland-libs-egl libxkbcommon-dev zlib-dev wayland-libs-egl mesa-egl mesa-dev && git clone https://github.com/moalyousef/cfltk && cd cfltk && git checkout ${{ inputs.cfltk_ver }} && git submodule update --init --recursive && cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_SYSTEM_LIBPNG=OFF -DOPTION_USE_SYSTEM_LIBJPEG=OFF -DOPTION_USE_SYSTEM_ZLIB=OFF -DOPTION_USE_GL=OFF -DFLTK_BUILD_EXAMPLES=OFF -DFLTK_BUILD_TEST=OFF -DOPTION_USE_THREADS=ON -DOPTION_LARGE_FILE=ON -DOPTION_BUILD_HTML_DOCUMENTATION=OFF -DOPTION_BUILD_PDF_DOCUMENTATION=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON && cmake --build bin && cp bin/libcfltk.a ./bin/fltk/lib/ && cd bin/fltk && tar zcvf lib_aarch64-alpine-linux-${{ inputs.cfltk_ver }}-musl.tar.gz lib && cp lib_aarch64-alpine-linux-${{ inputs.cfltk_ver }}-musl.tar.gz /output/"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: lib_aarch64-alpine-linux-musl
path: ${{ github.workspace }}/artifacts