Skip to content

Commit

Permalink
switch to new app installer
Browse files Browse the repository at this point in the history
Correct extension for artifact in CI

Signed-off-by: Liam Barry Allan <mrliamallan@live.co.uk>

Correct artifact name in SCP for CI

Signed-off-by: Liam Barry Allan <mrliamallan@live.co.uk>

Single job for gmake in CI

Signed-off-by: Liam Barry Allan <mrliamallan@live.co.uk>

Fix path to gmake in CI

Signed-off-by: Liam Barry Allan <mrliamallan@live.co.uk>
  • Loading branch information
ThePrez committed Jan 11, 2023
1 parent db6fd26 commit 0546dfc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
ssh_command: ssh ${{ secrets.IBMI_BUILD_USRPRF }}@${{ secrets.IBMI_BUILD_SYS }}
scp_dist_command: scp ${{ secrets.IBMI_BUILD_USRPRF }}@${{ secrets.IBMI_BUILD_SYS }}:/home/${{ secrets.IBMI_BUILD_USRPRF }}/build/${{ github.sha }}/manzan-${{ github.ref_name }}.zip .
scp_dist_command: scp ${{ secrets.IBMI_BUILD_USRPRF }}@${{ secrets.IBMI_BUILD_SYS }}:/home/${{ secrets.IBMI_BUILD_USRPRF }}/build/${{ github.sha }}/manzan-installer-${{ github.ref_name }}.jar .
remote_build_dir: /home/${{ secrets.IBMI_BUILD_USRPRF }}/build/${{ github.sha }}
rsync_command: rsync -a --exclude='./.*' --exclude='./runners' --exclude='./.git' --exclude='./docs' --rsync-path=/QOpenSys/pkgs/bin/rsync ./ ${{ secrets.IBMI_BUILD_USRPRF }}@${{ secrets.IBMI_BUILD_SYS }}:/home/${{ secrets.IBMI_BUILD_USRPRF }}/build/${{ github.sha }}/

Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
echo "short_sha=$(echo ${{ github.sha }} | head -c 7)" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Perform remote build
run: $ssh_command "cd $remote_build_dir && /QOpenSys/pkgs/bin/gmake/gmake manzan-${{ github.ref_name }}.zip"
run: $ssh_command "cd $remote_build_dir && /QOpenSys/pkgs/bin/gmake --jobs=1 manzan-installer-${{ github.ref_name }}.jar"
- name: Retrieve artifact
run: $scp_dist_command
- name: Cleanup remote build lib
Expand Down Expand Up @@ -72,6 +72,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./manzan-${{ github.ref_name }}.zip
asset_name: manzan-${{ github.ref_name }}.zip
asset_path: ./manzan-installer-${{ github.ref_name }}.jar
asset_name: manzan-installer-${{ github.ref_name }}.jar
asset_content_type: application/zip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ config/app.ini
*.ini
ile/src/mzversion.h
camel/src/main/java/com/github/theprez/manzan/Version.java
appinstall.jar
manzan-installer-*.jar
19 changes: 8 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ uninstall:
/QOpenSys/pkgs/bin/zip:
/QOpenSys/pkgs/bin/yum install zip

manzan-v%.zip: /QOpenSys/pkgs/bin/zip
/QOpenSys/pkgs/bin/wget:
/QOpenSys/pkgs/bin/yum install wget

appinstall.jar: /QOpenSys/pkgs/bin/wget
/QOpenSys/pkgs/bin/wget -O appinstall.jar https://github.com/ThePrez/AppInstall-IBMi/releases/download/v0.0.3/appinstall-v0.0.3.jar

manzan-installer-v%.jar: /QOpenSys/pkgs/bin/zip appinstall.jar
echo "Building version $*"
system "clrlib ${MANZAN_TEMPLIB}" || system "crtlib ${MANZAN_TEMPLIB}"
system "dltlib ${BUILDLIB}" || echo "could not delete"
Expand All @@ -37,13 +43,4 @@ manzan-v%.zip: /QOpenSys/pkgs/bin/zip
gmake -C config BUILDVERSION="$*" install
gmake -C ile BUILDVERSION="$*"
gmake -C camel BUILDVERSION="$*" clean install
system "crtsavf ${MANZAN_TEMPLIB}/distqsys"
system "crtsavf ${MANZAN_TEMPLIB}/diststmf"
rm -f /qsys.lib/${MANZAN_TEMPLIB}.lib/*.MODULE
system "SAV DEV('/qsys.lib/${MANZAN_TEMPLIB}.lib/distqsys.file') OBJ(('/qsys.lib/manzan.lib')) SAVACT(*YES)"
cp /qsys.lib/${MANZAN_TEMPLIB}.lib/distqsys.file .
system "SAV DEV('/qsys.lib/${MANZAN_TEMPLIB}.lib/diststmf.file') OBJ(('/opt/manzan') ('/QOpenSys/etc/manzan')) SAVACT(*YES)"
cp /qsys.lib/${MANZAN_TEMPLIB}.lib/diststmf.file .
/QOpenSys/pkgs/bin/zip -v -0 $@ diststmf.file distqsys.file
rm diststmf.file distqsys.file
system "dltlib ${MANZAN_TEMPLIB}"
/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit/bin/java -jar appinstall.jar --qsys manzan --dir /QOpenSys/etc/manzan --file /opt/manzan -o $@

0 comments on commit 0546dfc

Please sign in to comment.