Skip to content

Install random 💯

Install random 💯 #1

Workflow file for this run

name: "Install random apps 🧪"
env:
TERM: xterm
on:
push:
branches: '**'
paths:
- 'modules/**'
- INSTALL
- APP-MANAGER
- '!programs/**'
pull_request:
branches: '**'
paths:
- 'modules/**'
- INSTALL
- APP-MANAGER
- '!programs/**'
workflow_dispatch:
schedule:
- cron: '0 23 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
required:
name: Install AM 📝
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
count: ${{ steps.am-install.outputs.count }}
steps:
- name: "Check out repository"
uses: actions/checkout@v4
- name: "Install dependencies"
run: |
sudo apt install -y wget curl zsync 2> /dev/null
- name: "Install AM"
id: am-install
run: |
#mkdir -p results /usr/local/bin
chmod +x ./INSTALL && sudo ./INSTALL
count=$(find programs/x86_64/ programs/i686/ programs/aarch64/ -type f | wc -l)
echo "count=$count" >> $GITHUB_OUTPUT
x64Count=$(find programs/x86_64/ -type f | wc -l)
i68Count=$(find programs/i686/ -type f | wc -l)
a64Count=$(find programs/aarch64/ -type f | wc -l)
echo "available x86_64 apps: $x64Count" >> $GITHUB_STEP_SUMMARY
echo "available i686 apps: $i68Count" >> $GITHUB_STEP_SUMMARY
echo "available aarch64 apps: $a64Count" >> $GITHUB_STEP_SUMMARY
- name: "x86_64"
id: set-matrix
#if: matrix.config.arch == 'x86_64' # the arch indexed in xlocate
run: |
FILES=$(find programs/x86_64/ -maxdepth 1 -type f -printf "%f\n" | shuf -n 100)
MATRIX="{\"include\": ["
for file in $FILES; do
MATRIX+="{\"file\": \"$file\"},"
done
MATRIX="${MATRIX%,}]}"
echo "matrix: $MATRIX"
echo "matrix=$MATRIX" >> $GITHUB_ENV
echo "::set-output name=matrix::$MATRIX"
- name: "Display Matrix"
run: |
echo "${{ steps.set-matrix.outputs.matrix }}"
run-actions:
name: "check 💿️"
needs: required
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.required.outputs.matrix) }}
steps:
- name: "Check out repository"
uses: actions/checkout@v4
- name: "Install dependencies 📦️"
run: |
sudo apt-get -y update
sudo apt-get -y install wget curl zsync 2> /dev/null
- name: "Install AM"
run: |
mkdir -p results /usr/local/bin
chmod +x ./INSTALL
sudo ./INSTALL
- name: "Check out ${{ matrix.file }}"
run: |
mkdir -p results
am -i ${{ matrix.file }} && echo "OK: ${{ matrix.file }}" >> results/good || echo "FAIL! ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY
am -R ${{ matrix.file }} && echo "OK: ${{ matrix.file }}" >> results/removed || echo "REMOVE! ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY