Skip to content

Commit

Permalink
Merge branch 'Samsung:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsug-song authored Nov 15, 2021
2 parents 32176e2 + d0c94df commit 7dbd97c
Show file tree
Hide file tree
Showing 3,453 changed files with 329,839 additions and 77,290 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 16 additions & 1 deletion .github/branch-metadata.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
master:
api-level: API10
labels: [ API10 ]
tizen-branch: tizen
version-prefix: 10.0.0

API9:
api-level: API9
labels: [ API9 ]
tizen-branch: tizen_6.5
version-prefix: 9.0.0

API8:
api-level: API8
labels: [ API8 ]
tizen-branch: tizen
tizen-branch: tizen_6.0
version-prefix: 8.0.0

API7:
Expand All @@ -27,3 +39,6 @@ API4:
labels: [ API4 ]
tizen-branch: tizen_4.0
version-prefix: 4.0.1

DevelNUI:
labels: [ Devel-NUI ]
1 change: 1 addition & 0 deletions .github/workflows/build-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- DevelNUI
- API*

paths:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- master
- DevelNUI
- API*

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-api-level.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request_target:
branches:
- master
- DevelNUI
- API*

jobs:
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/deploy-documents-for-tizen-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: "Deploy Documents for Tizen Docs"

on:
schedule:
- cron: "0 17 * * *"
workflow_dispatch:

env:
DOCFX_FILE: docfx_tizen_docs.json
DEPLOY_BRANCH: tizen-docs-pages
CACHE_NAME: docfx-tizen-docs-pages-site

jobs:

build:
runs-on: [self-hosted, linux, x64]
container:
image: tizendotnet/tizenfx-build-worker:2.0

steps:
- uses: actions/checkout@v2
with:
repository: TizenAPI/TizenFX-Docs

- name: Checkout TizenFX sources
run: |
./build.sh clone
- name: Cache DocFX output
id: cache-site
uses: actions/cache@v2
with:
path: _site
key: ${{ env.CACHE_NAME }}-${{ hashFiles('repos/commits') }}

- name: Build Documents
if: steps.cache-site.outputs.cache-hit != 'true'
run: |
./build.sh restore
./build.sh build
- name: Archive Artifacts
run: |
tar cfz site.tar.gz _site/
- uses: actions/upload-artifact@v2
with:
name: documents
path: site.tar.gz

deploy:
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v2
with:
name: documents

- name: Extract Artifacts
run: |
tar xfz site.tar.gz
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: ${{ env.DEPLOY_BRANCH }}
user_name: 'TizenAPI-Bot'
user_email: '[email protected]'
full_commit_message: 'Update documents'
68 changes: 68 additions & 0 deletions .github/workflows/deploy-documents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Deploy Documents"

on:
schedule:
- cron: "0 16 * * *"
workflow_dispatch:

jobs:

build:
runs-on: [self-hosted, linux, x64]
container:
image: tizendotnet/tizenfx-build-worker:2.0

steps:
- uses: actions/checkout@v2
with:
repository: TizenAPI/TizenFX-Docs

- name: Checkout TizenFX sources
run: |
./build.sh clone
- name: Cache DocFX output
id: cache-site
uses: actions/cache@v2
with:
path: _site
key: docfx-gh-pages-site-${{ hashFiles('repos/commits') }}

- name: Build Documents
if: steps.cache-site.outputs.cache-hit != 'true'
run: |
./build.sh restore
./build.sh build
./build.sh index
- name: Archive Artifacts
run: |
tar cfz site.tar.gz _site/
- uses: actions/upload-artifact@v2
with:
name: documents
path: site.tar.gz

deploy:
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v2
with:
name: documents

- name: Extract Artifacts
run: |
tar xfz site.tar.gz
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: gh-pages
user_name: 'TizenAPI-Bot'
user_email: '[email protected]'
full_commit_message: 'Update documents'
106 changes: 106 additions & 0 deletions .github/workflows/deploy-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: "Deploy Packages"

on:
workflow_dispatch:
inputs:
target:
description: 'Branch to deploy'
required: true
default: 'master'
deploy_to_myget:
description: 'Deploy packages to MyGet?'
required: true
default: true
deploy_to_tizen:
description: 'Submit changes to Tizen?'
required: true
default: true

env:
TARGET_BRANCH: ${{ github.event.inputs.target }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.TARGET_BRANCH }}
fetch-depth: 0

- name: Git Config
run: |
git config --global user.name "TizenAPI-Bot"
git config --global user.email "[email protected]"
git config core.sshCommand "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
- name: Get Branch Metadata
id: metadata
uses: TizenAPI/tizenfx-build-actions/branch-metadata@master
with:
ref: ${{ env.TARGET_BRANCH }}

- name: Get Version
id: version
env:
VERSION_PREFIX: ${{ steps.metadata.outputs.version-prefix }}
run: |
VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
echo VERSION=$VERSION
echo "::set-output name=version::$VERSION"
- name: Build
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
./build.sh full
./build.sh pack $VERSION
- name: Tag Version
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
git tag -fa "v$VERSION" -m "Release $VERSION"
git push -f --tags origin refs/tags/"v$VERSION"
- name: Deploy NuGet packages to MyGet
if: github.event.inputs.deploy_to_myget == 'true'
env:
NUGET_SOURCE: https://tizen.myget.org/F/dotnet/api/v2/package
APIKEY: ${{ secrets.MYGET_APIKEY }}
run: |
dotnet nuget push Artifacts/*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000
- name: Setup SSH private keys
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Submit changes to Tizen
if: github.event.inputs.deploy_to_tizen == 'true'
env:
VERSION: ${{ steps.version.outputs.version }}
GERRIT_BRANCH: ${{ steps.metadata.outputs.tizen-branch }}
GERRIT_URL: ssh://[email protected]:29418/platform/core/csapi/tizenfx
run: |
if [ -z "$GERRIT_BRANCH" ]; then
echo "## no specified tizen branch"
exit 0
fi
git remote add gerrit $GERRIT_URL
git fetch gerrit $GERRIT_BRANCH
git checkout -t gerrit/$GERRIT_BRANCH
git merge --no-edit -s recursive -X theirs origin/$TARGET_BRANCH
./packaging/makespec.sh -r $VERSION -n $VERSION -i $VERSION
git add packaging/
if [ $(git diff --cached --numstat | wc -l) -eq 0 ]; then
echo "## no changes to sync"
exit 0
fi
SUBMIT_TAG=submit/$GERRIT_BRANCH/$(date '+%Y%m%d.%H%M%S')
echo SUBMIT_TAG=$SUBMIT_TAG
git commit -m "Release $VERSION"
git tag -m "Release $VERSION" $SUBMIT_TAG
git push -f gerrit HEAD:$GERRIT_BRANCH
git push gerrit refs/tags/$SUBMIT_TAG
echo "::notice title=Submit Request TAG::$SUBMIT_TAG"
60 changes: 60 additions & 0 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Nightly Release"


on:
schedule:
- cron: '0 15 * * *'
workflow_dispatch:

env:
TARGET_BRANCHES: 'master API9'

jobs:
nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Find Branches to Release
id: find-targets
run: |
TARGETS=""
# find branches without the version tag
for x in $TARGET_BRANCHES; do
tags=$(git tag --contains origin/$x)
if [[ ! $tags =~ v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
TARGETS="${TARGETS} $x"
fi
done
echo "::set-output name=targets::${TARGETS}"
- name: Trigger Release
uses: actions/github-script@v4
env:
TARGETS: ${{ steps.find-targets.outputs.targets }}
WORKFLOW_NAME: 'Deploy Packages'
with:
github-token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
script: |
var resp = await github.request('GET /repos/{owner}/{repo}/actions/workflows', {
owner: context.repo.owner,
repo: context.repo.repo
})
if (resp.status != 200) throw new Error('Failed to get workflow list.')
var workflow = resp.data.workflows.find(w => {
return w['name'] === process.env.WORKFLOW_NAME
})
if (!workflow) throw new Error('Unable to find the workflow.')
var targets = process.env.TARGETS.trim().split(' ')
targets.forEach(async target => {
var dispatchResp = await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: workflow.id,
ref: 'master',
inputs: { target, deploy_to_myget: 'true', deploy_to_tizen: 'true' }
})
console.log(`Event dispatch for ${target} : ${dispatchResp.status}`)
})
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ CompilationErrors-*.txt

# exceptional allowed binaries
!tools/bin/
!packaging/*.nupkg
!packaging/depends/*.nupkg

# external libraries
externals/libs/

# coverage
tools/coverage
coverage.json

Loading

0 comments on commit 7dbd97c

Please sign in to comment.