Skip to content

Commit

Permalink
Merge pull request #132 from TSRBerry/master
Browse files Browse the repository at this point in the history
[GHA] Update workflows to use offical dkp docker images
  • Loading branch information
spacemeowx2 authored Oct 24, 2022
2 parents e0ffe68 + 1de7a7d commit db7a072
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 26 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
39 changes: 31 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

- 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
41 changes: 33 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

- 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
45 changes: 35 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,60 @@ 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/[email protected]

- 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:
tag_name: ${{ github.ref }}
release_name: ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected].1
uses: actions/[email protected].2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit db7a072

Please sign in to comment.