Skip to content

Commit 98f492a

Browse files
Anchor (#25)
* Try to optimize weekly builds * Try to optimize weekly builds * Fix syntax error * Fix syntax errors * Fix issues 1 * Fix issues 2 * Fix issues 3 * Fix issues 4 * Fix issues 5 * Fix issues 5 * Fix issues 6 * Remove unnecessary action step * Fix issues 7 * Fix issues 8 * Fix issues 9 * Fix issues 10 * Fix issues 11 * Fix issues 12 * Fix issues 13 * Fix bug & upload missing fie * Fix issues 14 * Fix issues 15 * Fix issues 15 * Fix issues 16 * Add build for `arm64` * Make build only limit to 10 runner running at parallel * Fix syntax issue at line 11 * Try BuildJet to improve build times * Matrix build (#1) * Try to optimize weekly builds * Try to optimize weekly builds * Fix syntax error * Fix syntax errors * Fix issues 1 * Fix issues 2 * Fix issues 3 * Fix issues 4 * Fix issues 5 * Fix issues 5 * Fix issues 6 * Remove unnecessary action step * Fix issues 7 * Fix issues 8 * Fix issues 9 * Fix issues 10 * Fix issues 11 * Fix issues 12 * Fix issues 13 * Fix bug & upload missing fie * Fix issues 14 * Fix issues 15 * Fix issues 15 * Fix issues 16 * Add build for `arm64` * Make build only limit to 10 runner running at parallel * Fix syntax issue at line 11 * Try BuildJet to improve build times * Use Github CI & fix some issues * Fix some issues (#2) * Use Github CI & fix some issues * Add Pre-Build checks & fix push issues * Fix Pre-Build check not cancelling build * Try to fix permission issue on `Update distro-data.json` * Use `setup.sh` to download and install requirements * Try to fix permission issue on 'Update `distro-data.json`' * Revert 'Use `setup.sh` to download and install requirements' * Try to fix `setup.sh` * AUTO: update distro-data.json * Try to fix permission issue on 'Update `distro-data.json`' (#3) * Add Pre-Build checks & fix push issues * Fix Pre-Build check not cancelling build * Try to fix permission issue on `Update distro-data.json` * Use `setup.sh` to download and install requirements * Try to fix permission issue on 'Update `distro-data.json`' * Revert 'Use `setup.sh` to download and install requirements' * AUTO: update distro-data.json --------- Co-authored-by: ThatMG393 <[email protected]> * AUTO: update distro-data.json * Update `gen-update-json.py` to adapt to fork * Try to make CodeFactor A (#4) * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Fix possible shell injection (#5) * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Fix possible shell injection * Fix `utils.Popen(cmd)` issues (#6) * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Fix possible shell injection * Fix `utils.Popen(cmd)` issues * Fix `gen-update-json.py` (#7) * Fix `gen-update-json.py` * AUTO: update distro-data.json * Don't trigger build for specific files (#8) * Don't trigger build for specific files * Make Anchor workflow use Matrix implementation * Create README.md (#9) * Merge `Codefactor-A` branch (#10) * Try to fix permission issue on 'Update `distro-data.json`' (#3) * Add Pre-Build checks & fix push issues * Fix Pre-Build check not cancelling build * Try to fix permission issue on `Update distro-data.json` * Use `setup.sh` to download and install requirements * Try to fix permission issue on 'Update `distro-data.json`' * Revert 'Use `setup.sh` to download and install requirements' * AUTO: update distro-data.json --------- Co-authored-by: ThatMG393 <[email protected]> * AUTO: update distro-data.json * Update `gen-update-json.py` to adapt to fork * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Try to make CodeFactor A (#4) * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Fix possible shell injection * Fix possible shell injection (#5) * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Fix possible shell injection * Fix `utils.Popen(cmd)` issues * Fix `utils.Popen(cmd)` issues (#6) * Try to make CodeFactor A * Fix syntax issue of `build-and-release.yml` * Fix possible shell injection * Fix `utils.Popen(cmd)` issues * Fix `gen-update-json.py` * Don't trigger build for specific files --------- Co-authored-by: ThatMG393 <[email protected]> * Auto-generated Matrix JSON * Fix unclosed expression * Fix `generate-matrix` * Fix `generate-matrix` * Fix `generate-matrix` * Fix a typo in `gen-matrix-suite.py` * Remove useless steps * clean up anchor workflow * fixup secrets * fixup secrets * use all instead of architectures * remove unused imports * add a friendly comment * remove comments in workflows * better commit message * fixup secrets * add missing docstrings * AUTO JOB: (ANCHOR) update distro-data.json for V3R37 --------- Co-authored-by: ThatMG393 <[email protected]> Co-authored-by: thatmidcoder393 <[email protected]> Co-authored-by: ThatMG393 <[email protected]> Co-authored-by: SaicharanKandukuri <[email protected]>
1 parent 3a91cdd commit 98f492a

File tree

11 files changed

+281
-316
lines changed

11 files changed

+281
-316
lines changed
Lines changed: 84 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,101 @@
1-
name: Build and Release
1+
name: Build and Release (Anchor)
22
on:
3+
schedule: [{cron: "1 1 1 * *"}]
4+
workflow_dispatch: { }
35
push:
6+
paths-ignore:
7+
- '**.md'
8+
- '**.json'
9+
- '.gitignore'
10+
- '.vscode/**'
411
branches:
512
- anchor
613

14+
715
jobs:
8-
BuildRaw:
16+
suite-build:
917
runs-on: ubuntu-latest
18+
strategy:
19+
max-parallel: 10
20+
fail-fast: false
21+
matrix:
22+
suite: [ jammy ]
23+
variant: [ raw ]
24+
architecture: [ armhf, arm64 ] #, amd64 ]
25+
1026
steps:
11-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
1228
- uses: docker/setup-qemu-action@v2
1329

14-
- name: Setup Dependencies
15-
run: sudo apt-get update; sudo apt-get install git build-essential binfmt-support qemu-user-static debootstrap -y
16-
17-
- name: checkout submoudles
30+
- name: ⤵️ Install Dependencies
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install git build-essential binfmt-support qemu-user-static debootstrap -y
34+
35+
- name: 📥 Download Submodules
1836
run: |
1937
git submodule init
2038
git submodule update
21-
- name: Build tarballs
22-
run: |
23-
sudo bash build.sh -s jammy -v raw -a arm64
24-
25-
- name: upload artifacts
39+
40+
- name: 🛠️ Build ${{ matrix.suite }}-${{ matrix.variant }}-${{ matrix.architecture }}
41+
run: sudo bash build.sh -s ${{ matrix.suite }} -v ${{ matrix.variant }} -a ${{ matrix.architecture }}
42+
43+
- name: ⬆️ Upload Tarballs
2644
uses: actions/upload-artifact@v3
2745
with:
28-
name: raw-tarballs
29-
path: fs-cook/out/*.tar.gz
30-
31-
Create-Release:
46+
name: ${{ matrix.suite }}-${{ matrix.architecture }}-tarballs
47+
path: fs-cook/out/${{ matrix.suite }}-${{ matrix.variant }}-${{ matrix.architecture }}.tar.gz
48+
49+
create-release:
3250
runs-on: ubuntu-latest
33-
needs:
34-
- BuildRaw
51+
52+
if: ${{ always() }}
53+
needs: suite-build
54+
3555
steps:
36-
- uses: actions/checkout@v2
37-
- uses: actions/download-artifact@v3
38-
with:
39-
name: raw-tarballs
40-
- name: Compute release tag
41-
run: |
42-
pip3 install requests
43-
python3 /home/runner/work/udroid-download/udroid-download/.github/scripts/compute-release-tag.py
44-
45-
- name: Generate release notes
46-
run: sudo bash /home/runner/work/udroid-download/udroid-download/.github/scripts/generate-release-notes.sh
47-
- name: Create Release
48-
id: create_release
49-
uses: actions/create-release@v1
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
with:
53-
tag_name: ${{ env.VERSIONTAG }}
54-
release_name: ${{ env.VERSIONTAG }}
55-
body_path: release.md
56-
draft: false
57-
prerelease: true
58-
- name: Sleep for sometime
59-
run: sleep 60
60-
- name: Upload assets
61-
run: |
62-
set -x
63-
assets=()
64-
for asset in ./*.tar.gz; do
65-
assets+=("-a" "$asset")
66-
done
67-
tag_name="${VERSIONTAG}"
68-
hub release edit -F release.md "${assets[@]}" -m "$tag_name" "$tag_name"
69-
env:
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
72-
- name: update json
73-
run: |
74-
sudo apt-get install python3 -y
75-
sudo python3 gen_data/gen-update-json.py --release-tag ${{ env.VERSIONTAG }}
76-
set +e
77-
git config user.name github-actions[bot]
78-
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
79-
git add distro-data.json
80-
git commit -m "AUTO: update distro-data.json"
81-
git push
82-
set -e
56+
- uses: actions/checkout@v3
57+
with:
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- name: 📥 Download All Tarballs
61+
uses: actions/download-artifact@v3
62+
63+
- name: 🏷 Generate Release Tag
64+
run: |
65+
udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
66+
https://github.com/RandomCoderOrg/ubuntu-on-android \
67+
| tail -n1 | cut -d / -f 3 | cut -d v -f 2- )
68+
69+
udroid_download=$(
70+
git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
71+
https://github.com/RandomCoderOrg/udroid-download \
72+
| tail -n1 | cut -d / -f 3
73+
)
74+
75+
echo "VERSIONTAG=V${udroid_version}${BUILD_TYPE}R$((${udroid_download: -2} + 1))" >> $GITHUB_ENV
76+
77+
- name: 📝 Generate Release Notes
78+
run: sudo bash /home/runner/work/udroid-download/udroid-download/.github/scripts/generate-release-notes.sh
79+
80+
- name: ⬆️ Upload Suite Tarballs
81+
uses: ncipollo/release-action@v1
82+
with:
83+
token: ${{ secrets.GITHUB_TOKEN }}
84+
tag: ${{ env.VERSIONTAG }}
85+
name: ${{ env.VERSIONTAG }}
86+
bodyFile: release.md
87+
draft: false
88+
prerelease: false
89+
artifacts: '*-*-tarballs/*.tar.gz'
90+
makeLatest: true
91+
92+
- name: ⚙️ Generate New distro-data.json
93+
run: sudo python3 gen_data/gen-update-json.py --release-tag ${{ env.VERSIONTAG }}
94+
95+
- name: ⚙️ Update distro-data.json
96+
uses: stefanzweifel/git-auto-commit-action@v4
97+
with:
98+
skip_fetch: false
99+
skip_checkout: false
100+
commit_message: 'AUTO JOB: (ANCHOR) update distro-data.json for ${{ env.VERSIONTAG }}'
101+
file_pattern: distro-data.json

0 commit comments

Comments
 (0)