nightly #1035
This file contains hidden or 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: nightly | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 1 * * *' # run at 1 AM UTC | |
| env: | |
| ADTOOLS_DL_PATH: https://github.com/adtools/adtools/releases/download/20170213 | |
| UPLOAD_URL: https://uploads.github.com/repos/jens-maus/yam/releases/35749453/assets{?name,label} | |
| RELEASE_ID: 35749453 | |
| jobs: | |
| repo_change_check: | |
| name: Repository change check | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has_commits: ${{ steps.commit_check.outputs.has_commits }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check if any commits in last 24 hours | |
| id: commit_check | |
| run: echo "has_commits=$(git --no-pager log --pretty=oneline --since='24 hours ago' | wc -l)" >> $GITHUB_OUTPUT | |
| init: | |
| name: Setup environment | |
| runs-on: ubuntu-latest | |
| outputs: | |
| date: ${{ steps.setup.outputs.DATE }} | |
| sha7: ${{ steps.setup.outputs.GITHUB_SHA7 }} | |
| yamver: ${{ steps.setup.outputs.YAMVER }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup variables | |
| id: setup | |
| run : | | |
| echo "DATE=$(date +%Y%m%d)" >> $GITHUB_OUTPUT | |
| echo "GITHUB_SHA7=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT | |
| echo YAMVER=$(grep '#define __YAM_VERSION' src/YAM_global.c | cut -d '"' -f2 | tr -d ".") >> $GITHUB_OUTPUT | |
| - name: Cleanup old action artifacts | |
| run : .github/workflows/purge_artifacts.sh ${{ secrets.GITHUB_TOKEN }} | |
| build_adtools: | |
| if: needs.repo_change_check.outputs.has_commits > 0 | |
| name: Build using adtools | |
| runs-on: ubuntu-latest | |
| needs: [ init, repo_change_check ] | |
| timeout-minutes: 480 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| #platform: [ os3, os4, mos, aros-ppc, aros-i386, aros-x86_64 ] | |
| platform: [ os3, mos ] | |
| env: | |
| DATE: ${{ needs.init.outputs.date }} | |
| YAMVER: ${{ needs.init.outputs.yamver }} | |
| GITHUB_SHA7: ${{ needs.init.outputs.sha7 }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Restore timestamps | |
| uses: chetan/git-restore-mtime-action@v2 | |
| with: | |
| args: -q | |
| - name: Setup dependencies | |
| run: | | |
| sudo dpkg --add-architecture i386 | |
| sudo apt-get update -y -qq || true | |
| sudo apt-get -qq install libc6:i386 | |
| sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4 | |
| - name: Install adtools build env | |
| run: | | |
| if [[ ${{ matrix.platform }} =~ os3 ]]; then COMPILER=adtools-m68k-amigaos.tar.bz2 ; SUFFIX=AmigaOS3 ; fi | |
| if [[ ${{ matrix.platform }} =~ os4 ]]; then COMPILER=adtools-ppc-amigaos.tar.bz2 ; SUFFIX=AmigaOS4 ; fi | |
| if [[ ${{ matrix.platform }} =~ mos ]]; then COMPILER=adtools-ppc-morphos.tar.bz2 ; SUFFIX=MorphOS ; fi | |
| if [[ ${{ matrix.platform }} =~ aros-ppc ]]; then COMPILER=adtools-ppc-aros.tar.bz2 ; SUFFIX=AROS-ppc ; fi | |
| if [[ ${{ matrix.platform }} =~ aros-i386 ]]; then COMPILER=adtools-i386-aros.tar.bz2 ; SUFFIX=AROS-i386 ; fi | |
| if [[ ${{ matrix.platform }} =~ aros-x86_64 ]]; then COMPILER=adtools-x86_64-aros.tar.bz2 ; SUFFIX=AROS-x86_64 ; fi | |
| if [[ ${{ matrix.platform }} =~ aros-arm ]]; then COMPILER=adtools-arm-aros.tar.bz2 ; SUFFIX=AROS-arm ; fi | |
| echo "SUFFIX=${SUFFIX}" >> $GITHUB_ENV | |
| curl -L ${{ env.ADTOOLS_DL_PATH }}/adtools-utils.tar.bz2 | sudo tar xj -C / | |
| curl -L ${{ env.ADTOOLS_DL_PATH }}/${COMPILER} | sudo tar xj -C / | |
| #- name: remote debug tmate session | |
| # uses: mxschmitt/action-tmate@v1 | |
| # if: matrix.platform == 'os4' | |
| - name: Build YAM nightly | |
| timeout-minutes: 480 | |
| run: | | |
| export PATH=/usr/local/amiga/bin:/opt/m68k-amigaos/bin:/opt/ppc-amigaos/bin:/opt/ppc-morphos/bin:${PATH} | |
| ./scripts/mkdist.sh nightly ${{ matrix.platform }} | |
| - name: Upload nightly build archive | |
| uses: WebFreak001/deploy-nightly@v3.2.0 | |
| with: | |
| upload_url: ${{ env.UPLOAD_URL }} | |
| release_id: ${{ env.RELEASE_ID }} | |
| asset_path: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.SUFFIX }}.lha | |
| asset_name: YAM${{ env.YAMVER }}dev-$$-${{ env.SUFFIX }}.lha | |
| asset_content_type: application/x-lzh-compressed | |
| max_releases: 3 | |
| - name: Upload nightly build archive [debug] | |
| uses: WebFreak001/deploy-nightly@v3.2.0 | |
| with: | |
| upload_url: ${{ env.UPLOAD_URL }} | |
| release_id: ${{ env.RELEASE_ID }} | |
| asset_path: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.SUFFIX }}-debug.lha | |
| asset_name: YAM${{ env.YAMVER }}dev-$$-${{ env.SUFFIX }}-debug.lha | |
| asset_content_type: application/x-lzh-compressed | |
| max_releases: 3 | |
| - name: Upload files as workflow artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.SUFFIX }}*.lha* | |
| name: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.GITHUB_SHA7 }}-${{ env.SUFFIX }} | |
| continue-on-error: true | |
| build_docker_os4: | |
| if: needs.repo_change_check.outputs.has_commits > 0 | |
| name: Build using docker (os4) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 480 | |
| needs: [ init, repo_change_check ] | |
| container: | |
| image: walkero/amigagccondocker:os4-gcc11 | |
| volumes: | |
| - '${{ github.workspace }}:/opt/code' | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| env: | |
| SUFFIX: AmigaOS4 | |
| DATE: ${{ needs.init.outputs.date }} | |
| YAMVER: ${{ needs.init.outputs.yamver }} | |
| GITHUB_SHA7: ${{ needs.init.outputs.sha7 }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup dependencies | |
| run: | | |
| sudo apt-get update -y -qq || true | |
| sudo apt-get -qq install rsync | |
| - name: Add repository to git safe directories | |
| run: | | |
| git config --global --add safe.directory $GITHUB_WORKSPACE | |
| git config --global --add safe.directory /opt/code | |
| - name: Restore timestamps | |
| uses: chetan/git-restore-mtime-action@v2 | |
| with: | |
| args: -q | |
| - name: Build YAM nightly | |
| timeout-minutes: 480 | |
| run: | | |
| ./scripts/mkdist.sh nightly os4 | |
| - name: Upload nightly build archive | |
| uses: WebFreak001/deploy-nightly@v3.2.0 | |
| with: | |
| upload_url: ${{ env.UPLOAD_URL }} | |
| release_id: ${{ env.RELEASE_ID }} | |
| asset_path: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.SUFFIX }}.lha | |
| asset_name: YAM${{ env.YAMVER }}dev-$$-${{ env.SUFFIX }}.lha | |
| asset_content_type: application/x-lzh-compressed | |
| max_releases: 3 | |
| - name: Upload nightly build archive [debug] | |
| uses: WebFreak001/deploy-nightly@v3.2.0 | |
| with: | |
| upload_url: ${{ env.UPLOAD_URL }} | |
| release_id: ${{ env.RELEASE_ID }} | |
| asset_path: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.SUFFIX }}-debug.lha | |
| asset_name: YAM${{ env.YAMVER }}dev-$$-${{ env.SUFFIX }}-debug.lha | |
| asset_content_type: application/x-lzh-compressed | |
| max_releases: 3 | |
| - name: Upload files as workflow artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.SUFFIX }}*.lha* | |
| name: YAM${{ env.YAMVER }}dev-${{ env.DATE }}-${{ env.GITHUB_SHA7 }}-${{ env.SUFFIX }} | |
| continue-on-error: true |