-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICU-21733 Actions for building C/J demos (#29)
* ICU-21733 actions for icu4jweb * ICU-21733 actions for icu4cdemos and iucsamples * ICU-21733 actions to build and deploy on tag * typo
- Loading branch information
Showing
4 changed files
with
173 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,29 @@ | ||
name: Build ICU4C Demos | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# ccache? | ||
- name: Cache apk | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.apk | ||
key: apk | ||
restore-keys: | | ||
apk | ||
- name: Build iucsamples4c with docker | ||
run: > | ||
cd iucsamples/c && docker run --rm -v $HOME/.apk:/etc/apk/cache -v $(pwd)/:/usr/src -w /usr/src alpine:edge sh -c "apk --update add gcc make g++ bsd-compat-headers pkgconfig icu-dev && make all check" | ||
- name: Build icudemos with docker | ||
run: > | ||
cd icu-kube && sh build.sh | ||
# TODO: non-docker build? |
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,36 @@ | ||
name: Build ICU4J Demos | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build with Maven | ||
run: > | ||
mvn --file icu4jweb/pom.xml -s .github/workflows/mvn-settings.xml -B package | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build container unicode/icu4jweb | ||
run: > | ||
cd icu4jweb ; bash build-docker.sh | ||
- name: Build iucsamples4j | ||
run: > | ||
mvn --file iucsamples/j/icu2work/pom.xml -s .github/workflows/mvn-settings.xml -B test |
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,58 @@ | ||
<!-- | ||
Copyright © 1991 and later Unicode, Inc. | ||
All rights reserved. | ||
License and terms of use: http://www.unicode.org/copyright.html | ||
This file is used during builds to be able to access a temporary copy | ||
of icu4j.jar and utilities.jar. See CLDR-11585. | ||
TODO: Remove this when ICU-21251 is completed. | ||
--> | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<activeProfiles> | ||
<activeProfile>github</activeProfile> | ||
</activeProfiles> | ||
<profiles> | ||
<profile> | ||
<id>github</id> | ||
<repositories> | ||
<!-- the 'central' repository is already defined by default. --> | ||
<repository> | ||
<id>github</id> | ||
<name>GitHub unicode-org/cldr Apache Maven Packages</name> | ||
<url>https://maven.pkg.github.com/unicode-org/cldr</url> | ||
</repository> | ||
<repository> | ||
<id>githubicu</id> | ||
<name>GitHub unicode-org/icu Apache Maven Packages</name> | ||
<url>https://maven.pkg.github.com/unicode-org/icu</url> | ||
</repository> | ||
<repository> | ||
<id>githubcldr</id> | ||
<name>GitHub unicode-org/cldr Apache Maven Packages</name> | ||
<url>https://maven.pkg.github.com/unicode-org/cldr</url> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
</profiles> | ||
|
||
<servers> | ||
<server> | ||
<id>github</id> | ||
<username>${GITHUB_ACTOR}</username> | ||
<password>${GITHUB_TOKEN}</password> | ||
</server> | ||
<server> | ||
<id>githubicu</id> | ||
<username>${GITHUB_ACTOR}</username> | ||
<password>${GITHUB_TOKEN}</password> | ||
</server> | ||
<server> | ||
<id>githubcldr</id> | ||
<username>${GITHUB_ACTOR}</username> | ||
<password>${GITHUB_TOKEN}</password> | ||
</server> | ||
</servers> | ||
</settings> |
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,50 @@ | ||
name: Push to GCR Github Action | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build-and-push-to-gcr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build icu4jweb with Maven | ||
run: > | ||
mvn --file icu4jweb/pom.xml -s .github/workflows/mvn-settings.xml -B package | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get the tag name | ||
id: get_tag_name | ||
run: echo ::set-output name=GIT_TAG_NAME::${GITHUB_REF/refs\/tags\//} | ||
- name: Build and Upload ICU4C-Demos Container | ||
uses: RafikFarhad/push-to-gcr-github-action@v3 | ||
with: | ||
gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
registry: us.gcr.io | ||
project_id: icu4c-demos | ||
image_name: icu4c-demos | ||
image_tag: ${{ steps.get_tag_name.outputs.GIT_TAG_NAME}} | ||
dockerfile: icu-kube/docker.d/icu4c-demos/Dockerfile | ||
context: . | ||
build_args: ICU_PATH=system | ||
- name: Build and Upload ICU4J-Demos Container | ||
uses: RafikFarhad/push-to-gcr-github-action@v3 | ||
with: | ||
gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
registry: us.gcr.io | ||
project_id: icu4c-demos | ||
image_name: icu4j-demos | ||
image_tag: ${{ steps.get_tag_name.outputs.GIT_TAG_NAME}} | ||
dockerfile: icu4jweb/Dockerfile | ||
context: icu4jweb |