forked from quickemu-project/quickemu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: "Test dynamic 🧪" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
generate-matrix: | ||
name: "Generate Matrix Configuration" | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
matrix: ${{ steps.generate.outputs.matrix }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Install dependencies 📦️" | ||
run: sudo apt-get -y update && sudo apt-get -y install jq | ||
|
||
- name: "Generate OS matrix 📃" | ||
id: generate | ||
run: | | ||
./quickget | awk 'NR==2,/zorin/' | cut -d':' -f2 | grep -o '[^ ]*' | tail -n +2 | jq -R -s -c 'split("\n")[:-1] | map({os: .})' > matrix.json | ||
cat matrix.json | ||
echo "::set-output name=matrix::$(cat matrix.json)" | ||
- name: Debug generated matrix | ||
run: cat matrix.json | ||
|
||
testing: | ||
name: "Test" | ||
needs: generate-matrix | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Install dependencies 📦️" | ||
run: sudo apt-get -y update && sudo apt-get -y install curl qemu-utils jq | ||
|
||
- name: "Check ${{ matrix.config.os }} downloads 💿️" | ||
run: | | ||
mkdir -p results | ||
./quickget --check ${{ matrix.config.os }} > results/${{ matrix.config.os }}.txt | ||
- name: "Display results 📊" | ||
run: cat results/${{ matrix.config.os }}.txt |