diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 08d5808..6c2edbb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,13 @@ updates: prefix: submodule schedule: interval: daily + + - directory: / + open-pull-requests-limit: 5 + package-ecosystem: github-actions + reviewers: + - spacemeowx2 + commit-message: + prefix: gha + schedule: + interval: weekly diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 203382a..1872f83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,29 +6,52 @@ jobs: build: runs-on: ubuntu-latest + container: + image: devkitpro/devkita64:latest + + defaults: + run: + shell: bash + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: spacemeowx2/devkitpro-action@v2 - with: - libnx-rev: 5ca15e7696e174c41ee94974d62602fde722ac3b - cmd: make -j8 + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + + - name: Build + id: build + run: make -j8 PREFIX="ccache aarch64-none-elf-" + continue-on-error: true + + - name: Install libnx master & Retry build + id: retry + if: ${{ steps.build.outcome == 'failure' }} + run: | + pushd /tmp + git clone https://github.com/switchbrew/libnx + cd libnx + make -j8 PREFIX="ccache aarch64-none-elf-" + make install + popd + make -j8 PREFIX="ccache aarch64-none-elf-" - name: Upload built files - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: sdcard path: out/sd - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: ldn_mitm/ldn_mitm.elf - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: overlay/overlay.elf diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1b791fe..898a8b3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,34 +8,59 @@ jobs: build: runs-on: ubuntu-latest + container: + image: devkitpro/devkita64:latest + + defaults: + run: + shell: bash + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + - name: update Atmosphere-libs run: | pushd Atmosphere-libs + git fetch --all git reset --hard origin/master popd - - uses: spacemeowx2/devkitpro-action@v2 - with: - libnx-rev: master - cmd: make -j8 + + - name: Build + id: build + run: make -j8 PREFIX="ccache aarch64-none-elf-" + continue-on-error: true + + - name: Install libnx master & Retry build + id: retry + if: ${{ steps.build.outcome == 'failure' }} + run: | + pushd /tmp + git clone https://github.com/switchbrew/libnx + cd libnx + make -j8 PREFIX="ccache aarch64-none-elf-" + make install + popd + make -j8 PREFIX="ccache aarch64-none-elf-" - name: Upload built files - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: sdcard path: out/sd - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: ldn_mitm/ldn_mitm.elf - name: Upload elf file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v3 with: name: ldn_mitm.elf path: overlay/overlay.elf diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c88f66..fe43c88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,25 +9,49 @@ jobs: build: runs-on: ubuntu-latest + container: + image: devkitpro/devkita64:latest + + defaults: + run: + shell: bash + steps: - name: Set env - run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - - uses: actions/checkout@v1 + run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV + + - uses: actions/checkout@v3 with: submodules: true - - uses: spacemeowx2/devkitpro-action@v2 - with: - libnx-rev: 9865dbf92177c358b88fa7542b628d8a8a2a9d74 - cmd: make -j8 + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + + - name: Build + id: build + run: make -j8 PREFIX="ccache aarch64-none-elf-" + continue-on-error: true + + - name: Install libnx master & Retry build + id: retry + if: ${{ steps.build.outcome == 'failure' }} + run: | + pushd /tmp + git clone https://github.com/switchbrew/libnx + cd libnx + make -j8 PREFIX="ccache aarch64-none-elf-" + make install + popd + make -j8 PREFIX="ccache aarch64-none-elf-" + - name: Pack run: | cd ./out/sd sudo zip -r ./ldn_mitm_${{ env.RELEASE_VERSION }}.zip atmosphere switch + - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@v1.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -35,9 +59,10 @@ jobs: release_name: ${{ env.RELEASE_VERSION }} draft: false prerelease: false + - name: Upload Release Asset id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: