-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Merge pipeline | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Build '${{ matrix.project }}' container | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: [ linux-amd64, linux-arm32v7, linux-arm64 ] | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Allow multiarch | ||
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
|
||
- name: Build container | ||
run: | | ||
cd ${{ matrix.project }} | ||
docker build . --tag totalcross/${{ matrix.project }} | ||
- name: Login to DockerHub | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Push to DockerHub | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: docker push totalcross/${{ matrix.project }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v6.1.1, v7.0.0 | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Version (name of the tag to be referenced)' | ||
required: true | ||
|
||
jobs: | ||
docker: | ||
name: DockerHub tagging | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: [ linux-amd64, linux-arm32v7, linux-arm64 ] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Pull latest container | ||
run: docker pull totalcross/${{ matrix.project }}:latest | ||
- name: Tag latest container with the same repo tag | ||
run: docker tag totalcross/${{ matrix.project }}:latest totalcross/${{ matrix.project }}:${GITHUB_REF##*/} | ||
- name: Push the new tag | ||
run: docker push totalcross/${{ matrix.project }}:${GITHUB_REF##*/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM amd64/ubuntu:bionic | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y cmake ninja-build libsdl2-dev libfontconfig1-dev | ||
|
||
ENV BUILD_FOLDER /build | ||
|
||
WORKDIR ${BUILD_FOLDER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
FROM arm32v7/ubuntu:bionic | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
cmake \ | ||
ninja-build \ | ||
build-essential \ | ||
libfontconfig1-dev \ | ||
libtool \ | ||
libasound2-dev \ | ||
libpulse-dev \ | ||
libaudio-dev \ | ||
libx11-dev \ | ||
libxext-dev \ | ||
libxrandr-dev \ | ||
libxcursor-dev \ | ||
libxi-dev \ | ||
libxinerama-dev \ | ||
libxxf86vm-dev \ | ||
libxss-dev \ | ||
libgl1-mesa-dev \ | ||
libdbus-1-dev \ | ||
libudev-dev \ | ||
libgles2-mesa-dev \ | ||
libegl1-mesa-dev \ | ||
libibus-1.0-dev \ | ||
fcitx-libs-dev \ | ||
libsamplerate0-dev \ | ||
libsndio-dev \ | ||
libwayland-dev \ | ||
libxkbcommon-dev \ | ||
wayland-protocols \ | ||
git \ | ||
ca-certificates; \ | ||
apt-get install -y libglvnd-dev || apt-get -f install; \ | ||
apt-get clean | ||
|
||
RUN git clone https://github.com/SDL-mirror/SDL.git \ | ||
--branch=release-2.0.10 \ | ||
--single-branch \ | ||
--depth=1 \ | ||
&& cd SDL \ | ||
&& mkdir build; cd build \ | ||
&& CFLAGS="-O3 -fPIC" \ | ||
cmake ../ -G Ninja \ | ||
-DSDL_SHARED=0 \ | ||
-DSDL_AUDIO=0 \ | ||
-DVIDEO_VIVANTE=ON \ | ||
-DVIDEO_WAYLAND=ON \ | ||
-DWAYLAND_SHARED=ON; \ | ||
ninja install | ||
|
||
RUN rm -r /SDL | ||
|
||
ENV BUILD_FOLDER /build | ||
|
||
WORKDIR ${BUILD_FOLDER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
FROM arm64v8/ubuntu:bionic | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
cmake \ | ||
ninja-build \ | ||
build-essential \ | ||
libfontconfig1-dev \ | ||
libtool \ | ||
libasound2-dev \ | ||
libpulse-dev \ | ||
libaudio-dev \ | ||
libx11-dev \ | ||
libxext-dev \ | ||
libxrandr-dev \ | ||
libxcursor-dev \ | ||
libxi-dev \ | ||
libxinerama-dev \ | ||
libxxf86vm-dev \ | ||
libxss-dev \ | ||
libgl1-mesa-dev \ | ||
libdbus-1-dev \ | ||
libudev-dev \ | ||
libgles2-mesa-dev \ | ||
libegl1-mesa-dev \ | ||
libibus-1.0-dev \ | ||
fcitx-libs-dev \ | ||
libsamplerate0-dev \ | ||
libsndio-dev \ | ||
libwayland-dev \ | ||
libxkbcommon-dev \ | ||
wayland-protocols \ | ||
git \ | ||
ca-certificates; \ | ||
apt-get install -y libglvnd-dev || apt-get -f install; \ | ||
apt-get clean | ||
|
||
RUN git clone https://github.com/SDL-mirror/SDL.git \ | ||
--branch=release-2.0.10 \ | ||
--single-branch \ | ||
--depth=1 \ | ||
&& cd SDL \ | ||
&& mkdir build; cd build \ | ||
&& CFLAGS="-O3 -fPIC" \ | ||
cmake ../ -G Ninja \ | ||
-DSDL_SHARED=0 \ | ||
-DSDL_AUDIO=0 \ | ||
-DVIDEO_VIVANTE=ON \ | ||
-DVIDEO_WAYLAND=ON \ | ||
-DWAYLAND_SHARED=ON; \ | ||
ninja install | ||
|
||
RUN rm -r /SDL | ||
|
||
ENV BUILD_FOLDER /build | ||
|
||
WORKDIR ${BUILD_FOLDER} |