Skip to content

Commit

Permalink
Test building linux on tonsky/ubuntu-14.04:latest
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Nov 11, 2020
1 parent 7fb4356 commit 591dd5c
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 87 deletions.
149 changes: 75 additions & 74 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,66 @@ on:
- 'docs/**'
- 'examples/**'
- 'extras/**'
- 'script/build_skia_*'
- 'script/**'
- README.md

env:
skia_release: m87-4893488

jobs:
shared:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: '11.0.8'
- run: ./script/ci_deploy_shared.sh
env:
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: skija-shared
path: target/*.jar
# shared:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: actions/setup-java@v1
# with:
# java-version: '11.0.8'
# - run: ./script/ci_deploy_shared.sh
# env:
# SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
# - uses: actions/upload-artifact@v2
# with:
# name: skija-shared
# path: target/*.jar

macos:
runs-on: macos-10.15
needs: shared
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/setup-java@v1
with:
java-version: '11.0.8'
- name: Download Skia
run: |
curl --fail --location --silent --show-error https://github.com/JetBrains/skia-build/releases/download/${{ env.skia_release }}/Skia-${{ env.skia_release }}-macos-Release-x64.zip > Skia-${{ env.skia_release }}-macos-Release-x64.zip.zip
unzip -qq Skia-${{ env.skia_release }}-macos-Release-x64.zip.zip -d third_party/skia
- run: ./script/native.sh
- uses: actions/upload-artifact@v2
with:
name: skija-macos
path: target/native/*.dylib
- run: ./script/ci_deploy_macos.sh
env:
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
# macos:
# runs-on: macos-10.15
# needs: shared
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: seanmiddleditch/gha-setup-ninja@master
# - uses: actions/setup-java@v1
# with:
# java-version: '11.0.8'
# - name: Download Skia
# run: |
# curl --fail --location --silent --show-error https://github.com/JetBrains/skia-build/releases/download/${{ env.skia_release }}/Skia-${{ env.skia_release }}-macos-Release-x64.zip > Skia-${{ env.skia_release }}-macos-Release-x64.zip.zip
# unzip -qq Skia-${{ env.skia_release }}-macos-Release-x64.zip.zip -d third_party/skia
# - run: ./script/native.sh
# - uses: actions/upload-artifact@v2
# with:
# name: skija-macos
# path: target/native/*.dylib
# - run: ./ci/deploy_macos.sh
# env:
# SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}

linux:
runs-on: ubuntu-latest
needs: shared
container: tonsky/ubuntu-14.04:latest
# needs: shared
steps:
- run: |
echo "/usr/lib/binutils-2.26/bin" >> $GITHUB_PATH
echo "/root/apache-maven-3.6.3/bin" >> $GITHUB_PATH
echo "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: '11.0.8'
- run: sudo ./script/ci_prepare_linux.sh
- name: Download Skia
run: |
curl --fail --location --silent --show-error https://github.com/JetBrains/skia-build/releases/download/${{ env.skia_release }}/Skia-${{ env.skia_release }}-linux-Release-x64.zip > Skia-${{ env.skia_release }}-linux-Release-x64.zip.zip
Expand All @@ -75,35 +76,35 @@ jobs:
with:
name: skija-linux
path: target/native/*.so
- run: ./script/ci_deploy_linux.sh
- run: ./ci/deploy_linux.sh
env:
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}

windows:
runs-on: windows-2019
needs: shared
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: microsoft/setup-msbuild@v1.0.1
- uses: ilammy/msvc-dev-cmd@v1.3.0
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/setup-java@v1
with:
java-version: '11.0.8'
- name: Download Skia
shell: bash
run: |
curl --fail --location --silent --show-error https://github.com/JetBrains/skia-build/releases/download/${{ env.skia_release }}/Skia-${{ env.skia_release }}-windows-Release-x64.zip > Skia-${{ env.skia_release }}-windows-Release-x64.zip.zip
unzip -qq Skia-${{ env.skia_release }}-windows-Release-x64.zip.zip -d third_party/skia
- shell: bash
run: ./script/native.sh
- uses: actions/upload-artifact@v2
with:
name: skija-windows
path: target/native/*.dll
- shell: bash
run: ./script/ci_deploy_windows.sh
env:
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
# windows:
# runs-on: windows-2019
# needs: shared
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: microsoft/setup-msbuild@v1.0.1
# - uses: ilammy/msvc-dev-cmd@v1.3.0
# - uses: seanmiddleditch/gha-setup-ninja@master
# - uses: actions/setup-java@v1
# with:
# java-version: '11.0.8'
# - name: Download Skia
# shell: bash
# run: |
# curl --fail --location --silent --show-error https://github.com/JetBrains/skia-build/releases/download/${{ env.skia_release }}/Skia-${{ env.skia_release }}-windows-Release-x64.zip > Skia-${{ env.skia_release }}-windows-Release-x64.zip.zip
# unzip -qq Skia-${{ env.skia_release }}-windows-Release-x64.zip.zip -d third_party/skia
# - shell: bash
# run: ./script/native.sh
# - uses: actions/upload-artifact@v2
# with:
# name: skija-windows
# path: target/native/*.dll
# - shell: bash
# run: ./script/ci_deploy_windows.sh
# env:
# SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
2 changes: 1 addition & 1 deletion script/ci_deploy_linux.sh → ci/deploy_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -o errexit -o nounset -o pipefail
cd "`dirname $0`/.."

REVISION=$(./script/revision.sh)
REVISION=$(./ci/revision.sh)
echo "Deploying skija-linux v${REVISION}"
sed -i -e "s/0.0.0-SNAPSHOT/$REVISION/g" -e "s/platform/linux/g" pom.native.xml
mvn --batch-mode --file pom.native.xml --settings settings.xml -DskipTests -Dspace.username=Nikita.Prokopov -Dspace.password=${SPACE_TOKEN} deploy
2 changes: 1 addition & 1 deletion script/ci_deploy_macos.sh → ci/deploy_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -o errexit -o nounset -o pipefail
cd "`dirname $0`/.."

REVISION=$(./script/revision.sh)
REVISION=$(./ci/revision.sh)
echo "Deploying skija-macos v${REVISION}"
sed -i "" -e "s/0.0.0-SNAPSHOT/$REVISION/g" -e "s/platform/macos/g" pom.native.xml
mvn --batch-mode --file pom.native.xml --settings settings.xml -DskipTests -Dspace.username=Nikita.Prokopov -Dspace.password=${SPACE_TOKEN} deploy
2 changes: 1 addition & 1 deletion script/ci_deploy_shared.sh → ci/deploy_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -o errexit -o nounset -o pipefail
cd "`dirname $0`/.."

REVISION=$(./script/revision.sh)
REVISION=$(./ci/revision.sh)
echo "Deploying skija-shared v${REVISION}"
sed -i "s/0.0.0-SNAPSHOT/$REVISION/g" pom.shared.xml
mvn --batch-mode --file pom.shared.xml --settings settings.xml -DskipTests -Dspace.username=Nikita.Prokopov -Dspace.password=${SPACE_TOKEN} deploy
2 changes: 1 addition & 1 deletion script/ci_deploy_windows.sh → ci/deploy_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -o errexit -o nounset -o pipefail
cd "`dirname $0`/.."

REVISION=$(./script/revision.sh)
REVISION=$(./ci/revision.sh)
echo "Deploying skija-windows v${REVISION}"
sed -i -e "s/0.0.0-SNAPSHOT/$REVISION/g" -e "s/platform/windows/g" pom.native.xml
mvn --batch-mode --file pom.native.xml --settings settings.xml -DskipTests -Dspace.username=Nikita.Prokopov -Dspace.password=${SPACE_TOKEN} deploy
File renamed without changes.
18 changes: 18 additions & 0 deletions ci/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:14.04

WORKDIR /root

RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
RUN add-apt-repository -y ppa:openjdk-r/ppa
RUN add-apt-repository -y ppa:git-core/ppa
RUN apt-get update -y
RUN apt-get install -y binutils-2.26 wget curl zip python git build-essential libssl-dev gcc-9 g++-9 ninja-build fontconfig libfontconfig1-dev libglu1-mesa-dev openjdk-11-jdk-headless
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
# RUN update-alternatives --config gcc
RUN wget --no-verbose http://www.cmake.org/files/v3.18/cmake-3.18.4.tar.gz && tar -xzf cmake-3.18.4.tar.gz && cd cmake-3.18.4/ && ./configure && make && make install
RUN wget --no-verbose https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && tar -xzf apache-maven-3.6.3-bin.tar.gz
RUN echo 'export PATH=/root/apache-maven-3.6.3/bin:/usr/lib/binutils-2.26/bin:$PATH' >> $HOME/.bashrc
RUN echo 'export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64' >> $HOME/.bashrc
RUN /usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
RUN /var/lib/dpkg/info/ca-certificates-java.postinst configure
9 changes: 0 additions & 9 deletions script/ci_prepare_linux.sh

This file was deleted.

0 comments on commit 591dd5c

Please sign in to comment.