compile release #95
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
name: compile release | |
on: | |
push: | |
branches: [ main, devel ] | |
schedule: | |
- cron: "32 14 3,17 * *" | |
jobs: | |
# create a build matrix with the available make targets | |
list-targets: | |
runs-on: ubuntu-latest | |
outputs: | |
targets: ${{ steps.listing.outputs.targets }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: list available make targets | |
id: listing | |
run: | | |
make list-targets \ | |
| tr -d '\n' \ | |
| jq -Rsc 'split(" ")' \ | |
| sed 's:^:targets=:' >> $GITHUB_OUTPUT | |
# compile binaries for available targets listed above | |
build: | |
runs-on: ubuntu-latest | |
needs: list-targets | |
strategy: | |
fail-fast: false | |
matrix: | |
target: ${{ fromJson(needs.list-targets.outputs.targets) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Compile static binaries for target | |
run: | | |
make clean | |
make ${{ matrix.target }} || \ | |
(echo "=== RETRY 1 ==="; make ${{ matrix.target }} ) || \ | |
(echo "=== RETRY 2 ==="; make ${{ matrix.target }} ) | |
rm -f compiled/native | |
make sources/${{ matrix.target }}.tar | |
- name: Upload job artifact | |
uses: actions/upload-artifact@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
name: ${{ matrix.target }} | |
path: | | |
compiled/* | |
sources/* | |
retention-days: 60 |