Skip to content

Commit

Permalink
.github: partial revert of massive-parallel builds
Browse files Browse the repository at this point in the history
The massive-parallel builds added recently are a bit shaky still, so
while stabilzation is ongoing we revert for builds for release.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Apr 25, 2024
1 parent 87177cd commit 72c5b37
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set Build Variables
id: vars
run: |
target=${{ matrix.platform }}
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
- name: Restore Cache of dl/
uses: actions/cache@v4
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
Expand All @@ -37,18 +42,21 @@ jobs:
restore-keys: |
ccache-${{ matrix.platform }}-
ccache-
- name: Configure & Build
run: |
target=${{ matrix.platform }}_defconfig
echo "Building $target ..."
make $target
make
- name: Prepare Artifact
run: |
cd output/
mv images ${{ steps.vars.outputs.dir }}
ln -s ${{ steps.vars.outputs.dir }} images
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
- name: Test
if: matrix.platform == 'x86_64'
run: |
Expand All @@ -57,6 +65,7 @@ jobs:
with:
path: output/${{ steps.vars.outputs.tgz }}
name: artifact-${{ matrix.platform }}

release:
if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}}
name: Upload Latest Build
Expand All @@ -69,6 +78,7 @@ jobs:
with:
pattern: "artifact-*"
merge-multiple: true

- uses: ncipollo/release-action@v1
with:
allowUpdates: true
Expand All @@ -79,6 +89,7 @@ jobs:
tag: "latest"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "*.tar.gz"

- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Clean up cruft ...
run: |
./test/env -c
- name: Set Build Variables
id: vars
run: |
target=x86_64
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
- name: Restore Cache of dl/
uses: actions/cache@v4
with:
Expand All @@ -39,6 +42,7 @@ jobs:
restore-keys: |
dl-netconf-
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
Expand All @@ -47,6 +51,7 @@ jobs:
restore-keys: |
ccache-x86_64-
ccache-
- name: Configure NETCONF
run: |
make x86_64_defconfig
Expand All @@ -57,7 +62,7 @@ jobs:
- name: Build
run: |
make -j
make
- name: Prepare Artifact
run: |
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ jobs:
platform: [aarch64, x86_64]
fail-fast: false
steps:
- name: Maintenance
run: |
docker image prune -af
docker volume prune -f
docker container prune -f
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set Release Variables
id: vars
run: |
Expand All @@ -47,13 +45,15 @@ jobs:
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
echo "out=/mnt/x-$target" >> $GITHUB_OUTPUT
- name: Restore Cache of dl/
uses: actions/cache@v4
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v4
with:
Expand All @@ -62,6 +62,7 @@ jobs:
restore-keys: |
ccache-${{ matrix.platform }}-
ccache-
- name: Configure & Build
env:
INFIX_RELEASE: ${{ steps.vars.outputs.ver }}
Expand All @@ -73,9 +74,11 @@ jobs:
export O=${{ steps.vars.outputs.out }}
make $target
make
- name: Generate SBOM from Build
run: |
make legal-info
- name: Prepare Artifacts
run: |
cd ${{ steps.vars.outputs.out }}
Expand All @@ -85,10 +88,12 @@ jobs:
mv legal-info legal-info-$target
tar chfz legal-info-$target.tar.gz legal-info-$target
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.platform }}
path: ${{ steps.vars.outputs.out }}/*.tar.gz

release:
name: Release Infix ${{ github.ref_name }}
needs: build
Expand All @@ -97,6 +102,9 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Set Release Variables
id: rel
run: |
Expand All @@ -118,27 +126,32 @@ jobs:
fi
echo "pre=${{ steps.rel.outputs.pre }}"
echo "latest=${{ steps.rel.outputs.latest }}"
- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true

- name: Create checksums ...
run: |
for file in *.tar.gz; do
sha256sum $file > $file.sha256
done
- name: Extract ChangeLog entry ...
run: |
awk '/^-----*$/{if (x == 1) exit; x=1;next}x' doc/ChangeLog.md \
|head -n -1 > release.md
cat release.md
- uses: ncipollo/release-action@v1
with:
name: Infix ${{ github.ref_name }}
prerelease: ${{ steps.rel.outputs.pre }}
makeLatest: ${{ steps.rel.outputs.latest }}
bodyFile: release.md
artifacts: "*.tar.gz*"

- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit 72c5b37

Please sign in to comment.