mirror of
https://github.com/jcefmaven/jcefbuild.git
synced 2025-09-23 07:36:38 +08:00
Add dispatchable workflow
This commit is contained in:
parent
e42c8126b8
commit
bf5b6851c5
58
.github/workflows/build.yml
vendored
Normal file
58
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'Git commit id to checkout'
|
||||
required: false
|
||||
default: 'master'
|
||||
|
||||
jobs:
|
||||
linux-amd64:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Build
|
||||
run: |
|
||||
chmod +x compile_linux.sh
|
||||
./compile_linux.sh amd64 Release ${{ github.event.inputs.ref }}
|
||||
-
|
||||
name: Export artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: linux-amd64.tar.gz
|
||||
path: out/binary_distrib.tar.gz
|
||||
|
||||
|
||||
linux-i386:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Build
|
||||
run: |
|
||||
chmod +x compile_linux.sh
|
||||
./compile_linux.sh 386 Release ${{ github.event.inputs.ref }}
|
||||
-
|
||||
name: Export artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: linux-i386.tar.gz
|
||||
path: out/binary_distrib.tar.gz
|
||||
|
@ -6,6 +6,9 @@ ARG BUILD_TYPE
|
||||
#Declare architecture argument (386 or amd64)
|
||||
ARG TARGETARCH
|
||||
|
||||
#Declare git ref
|
||||
ARG REF
|
||||
|
||||
WORKDIR /builder
|
||||
#Copy existing sources, if any
|
||||
COPY jcef /jcef
|
||||
|
@ -1,14 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! $# -eq 2 ]
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
echo "Usage: ./compile_linux.sh <architecture> <buildType>"
|
||||
echo "Usage: ./compile_linux.sh <architecture> <buildType> [ref]"
|
||||
echo ""
|
||||
echo "architecture: the target architecture to build for. Architectures are either 386 or amd64."
|
||||
echo "buildType: either Release or Debug"
|
||||
echo "ref: the git commit id to pull"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#Execute buildx with linux dockerfile and output to current directory
|
||||
docker buildx build --platform=linux/$1 --build-arg TARGETARCH=$1 --build-arg BUILD_TYPE=$2 --file DockerfileLinux --output out .
|
||||
|
||||
if [ $# -eq 2 ]
|
||||
then
|
||||
docker buildx build --platform=linux/$1 --build-arg TARGETARCH=$1 --build-arg BUILD_TYPE=$2 --build-arg REF=master --file DockerfileLinux --output out .
|
||||
else
|
||||
docker buildx build --platform=linux/$1 --build-arg TARGETARCH=$1 --build-arg BUILD_TYPE=$2 --build-arg REF=$3 --file DockerfileLinux --output out .
|
||||
fi
|
||||
|
@ -8,13 +8,13 @@ if [ ! -f "/jcef/README.md" ]; then
|
||||
echo "Did not find existing files to build - cloning..."
|
||||
rm -rf /jcef
|
||||
git clone https://bitbucket.org/chromiumembedded/java-cef.git /jcef
|
||||
cd /jcef
|
||||
git checkout ${REF}
|
||||
else
|
||||
echo "Found existing files to build"
|
||||
cd /jcef
|
||||
fi
|
||||
|
||||
# Enter the JCEF source code directory.
|
||||
cd /jcef
|
||||
|
||||
# Create and enter the `jcef_build` directory.
|
||||
# The `jcef_build` directory name is required by other JCEF tooling
|
||||
# and should not be changed.
|
||||
|
Loading…
Reference in New Issue
Block a user