Skip to content

Commit 6ff3bfa

Browse files
authored
Update main.yml
1 parent c080761 commit 6ff3bfa

File tree

1 file changed

+54
-11
lines changed

1 file changed

+54
-11
lines changed

.github/workflows/main.yml

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,45 @@
11
name: Main
2-
on: [push]
2+
# Controls when the action will run.
3+
on:
4+
# Triggers the workflow on push or pull request events but only for the main branch
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
schedule:
10+
- cron: 0 12 * * 0
11+
watch:
12+
types: [started]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
317
jobs:
418
build-dart-sdk:
519
runs-on: ubuntu-latest
620
steps:
7-
- uses: actions/checkout@v2
21+
- name: Maximize build space
22+
uses: easimon/maximize-build-space@v4
23+
with:
24+
root-reserve-mb: 512
25+
swap-size-mb: 1024
26+
remove-dotnet: 'true'
27+
remove-haskell: 'true'
28+
remove-android: 'true'
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
- name: Echo Free space
32+
run: |
33+
echo "Free space:"
34+
df -h
835
- name: Set up Python 2.x
936
uses: actions/setup-python@v2
1037
with:
1138
python-version: '2.x'
1239
- name: Prepare
1340
run: |
1441
sudo apt-get update
15-
sudo apt-get install g++-aarch64-linux-gnu
42+
sudo apt-get install g++-aarch64-linux-gnu g++-arm-linux-gnueabihf
1643
sudo apt-get install g++-multilib
1744
sudo apt-get install zip
1845
- name: Get Resource
@@ -23,26 +50,42 @@ jobs:
2350
cd dart-sdk
2451
fetch dart
2552
cd sdk
26-
git checkout 2.12.0-223.0.dev
53+
git checkout master
2754
ls
2855
sed -i "s#/data/local/tmp#/data/data/com.termux/files/home/tmp#g" runtime/bin/directory_android.cc
2956
sed -n '431,433p' runtime/bin/directory_android.cc
3057
cd ../
31-
echo "target_os = ['android']" >> .gclient
58+
echo "target_os = ['android','linux']" >> .gclient
3259
gclient sync
3360
- name: Build SDK
3461
run: |
3562
export PATH="$PATH:$PWD/depot_tools"
3663
cd dart-sdk/sdk
3764
ls tools/bots
3865
./tools/build.py --no-goma -m release --arch=arm64 --os=android create_sdk
66+
./tools/build.py --no-goma -m release --arch=arm --os=android create_sdk
67+
./tools/build.py --no-goma -m release --arch=arm64 create_sdk
68+
./tools/build.py --no-goma -m release --arch=arm create_sdk
3969
- name: Zip SDK
4070
run: |
41-
cd dart-sdk/sdk
42-
zip -q -r dart-sdk-android-arm64.zip out/ReleaseAndroidARM64/dart-sdk
71+
cd dart-sdk/sdk/out
72+
ls
73+
zip -q -r dart-sdk-android-arm64.zip ReleaseAndroidARM64/dart-sdk
74+
zip -q -r dart-sdk-android-arm.zip ReleaseAndroidARM/dart-sdk
75+
zip -q -r dart-sdk-linux-arm64.zip ReleaseXARM64/dart-sdk
76+
zip -q -r dart-sdk-linux-arm.zip ReleaseXARM/dart-sdk
77+
- name: Get current date
78+
id: date
79+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
80+
- name: Test with environment variables
81+
run: echo $TAG_NAME - $RELEASE_TIME
82+
env:
83+
TAG_NAME: Dart-SDK
84+
RELEASE_TIME: ${{ steps.date.outputs.date }}
4385
- name: Release SDK
44-
uses: ncipollo/release-action@v1.5.0
86+
uses: ncipollo/release-action@v1
4587
with:
46-
artifacts: "dart-sdk/sdk/*.zip"
47-
tag: "sdk"
48-
token: ${{ secrets.RElEASE_TOKEN }}
88+
artifacts: "dart-sdk/sdk/out/*.zip"
89+
tag: Dart-SDK-${{ steps.date.outputs.date }}
90+
token: ${{ secrets.RELEASE_TOKEN }}
91+
allowUpdates: true

0 commit comments

Comments
 (0)