Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
auricom committed Sep 24, 2024
1 parent 837fb7d commit 779836a
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 958 deletions.
16 changes: 8 additions & 8 deletions .github/scripts/prepare-matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ def get_app_metadata(subdir, meta, forRelease=False, channels=None):
elif os.path.isfile(os.path.join("./apps", app, "metadata.json")):
meta = load_metadata_file_json(os.path.join("./apps", app, "metadata.json"))

appsToBuild = get_app_metadata(os.path.join("./apps", app), meta, forRelease, channels=channels)
if appsToBuild is not None:
appsToBuild["apps"].extend(appsToBuild["apps"])
appsToBuild["appsPlatforms"].extend(appsToBuild["appsPlatforms"])
appToBuild = get_app_metadata(os.path.join("./apps", app), meta, forRelease, channels=channels)
if appToBuild is not None:
appsToBuild["apps"].extend(appToBuild["apps"])
appsToBuild["appsPlatforms"].extend(appToBuild["appsPlatforms"])
else:
for subdir, dirs, files in os.walk("./apps"):
for file in files:
Expand All @@ -133,8 +133,8 @@ def get_app_metadata(subdir, meta, forRelease=False, channels=None):
else:
continue
if meta is not None:
appsToBuild = get_app_metadata(subdir, meta, forRelease)
if appsToBuild is not None:
appsToBuild["apps"].extend(appsToBuild["apps"])
appsToBuild["appsPlatforms"].extend(appsToBuild["appsPlatforms"])
appToBuild = get_app_metadata(subdir, meta, forRelease)
if appToBuild is not None:
appsToBuild["apps"].extend(appToBuild["apps"])
appsToBuild["appsPlatforms"].extend(appToBuild["appsPlatforms"])
print(json.dumps(appsToBuild))
22 changes: 6 additions & 16 deletions .github/workflows/build-applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ on:
required: false
default: false
type: boolean
push:

jobs:
prepare:
Expand All @@ -32,17 +31,8 @@ jobs:
shell: bash
run: echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV

# - name: Generate Token
# uses: actions/create-github-app-token@v1
# id: app-token
# with:
# app-id: "${{ secrets.BOT_APP_ID }}"
# private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@v4
with:
token: "${{ steps.app-token.outputs.token }}"

- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -73,13 +63,13 @@ jobs:
name: Build/Test ${{ matrix.app.name }} (${{ matrix.app.platform }})
needs: prepare
runs-on: ubuntu-latest
if: ${{ toJSON(fromJSON(needs.prepare.outputs.matrices).appPlatforms) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).appPlatforms) != '' }}
if: ${{ toJSON(fromJSON(needs.prepare.outputs.matrices).appsPlatforms) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).appsPlatforms) != '' }}
outputs:
date: ${{ steps.archive.outputs.date }}
strategy:
fail-fast: false
matrix:
app: "${{ fromJSON(needs.prepare.outputs.matrices).appPlatforms }}"
app: "${{ fromJSON(needs.prepare.outputs.matrices).appsPlatforms }}"
permissions:
contents: read
packages: write
Expand Down Expand Up @@ -107,13 +97,13 @@ jobs:
check-latest: true

- name: Update go modules
# Disable dependencies updates for v0.52.x
if: matrix.major-version != 'v0.52.x'
if: ${{ matrix.app.update_modules }}
run: |
set -x
ls -l
ls -l ../
ls -l ../../
ls -l ../../nightly-stack
ls -l ../../nightly-stack/.github/
ls -l ../../nightly-stack/.github/scripts/
cd ${{ matrix.app.repository }}/${{ matrix.app.path }}
COSMOSSDK_BRANCH=${{ matrix.app.branch }} ../../nightly-stack/.github/scripts/update-go-modules.sh
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/nightlies-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,24 @@ on:
default: all
schedule:
- cron: "0 0 * * *"
pull_request:

jobs:
simple-checks:
name: Simple Checks
uses: .github/workflows/simple-checks.yaml
uses: ./.github/workflows/simple-checks.yaml

build-images:
name: Build Images
needs: simple-checks
uses: .github/workflows/build-applications.yaml
uses: ./.github/workflows/build-applications.yaml
secrets: inherit
permissions:
contents: read
packages: write
with:
appsToBuild: ${{ inputs.appsToBuild }}
# appsToBuild: ${{ inputs.appsToBuild }}
appsToBuild: all
publishArtifacts: true
sendNotifications: true

Expand Down
Loading

0 comments on commit 779836a

Please sign in to comment.