Skip to content

Commit

Permalink
CI-CD: modify scripts to handle multiple architectures in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Mar 21, 2024
1 parent 1d4702a commit bb97049
Show file tree
Hide file tree
Showing 26 changed files with 181 additions and 143 deletions.
6 changes: 3 additions & 3 deletions .github/actions/artfload/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: artifact-load
description: 'Download Artifact (tar file) and restore it to git subdirectory'
inputs:
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
Expand Down Expand Up @@ -67,7 +67,7 @@ runs:
name: Restore Artifact
uses: "./.github/actions/tarload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: ${{ inputs.gitpath }}
fullname: ${{ steps.tarname.outputs.fullname }}
owdebug: ${{ inputs.owdebug }}
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/artfsave/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: artifact-save
description: 'Upload Artifact (tar file), first create it from git subdirectory'
inputs:
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
Expand Down Expand Up @@ -56,7 +56,7 @@ runs:
- if: inputs.noarchive == ''
uses: "./.github/actions/tarsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: ${{ inputs.gitpath }}
fullname: ${{ steps.tarname.outputs.fullname }}
owdebug: ${{ inputs.owdebug }}
Expand Down
19 changes: 12 additions & 7 deletions .github/actions/boot/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: boot
description: 'Process OW bootstrap build'
inputs:
arch:
hostos:
description: 'host os'
required: false
default: ''
type: string
suffix:
description: 'run-time platform'
required: false
default: ''
Expand Down Expand Up @@ -34,7 +39,7 @@ inputs:
runs:
using: composite
steps:
- if: inputs.arch == 'lnx' || inputs.arch == 'osx'
- if: inputs.hostos == 'lnx' || inputs.hostos == 'osx'
name: Bootstrap
run: ${{ inputs.bldscript }} ${{ inputs.tools }}
env:
Expand All @@ -44,7 +49,7 @@ runs:
OWDEBUG: ${{ inputs.owdebug }}
OWVERBOSE: 1
shell: bash
- if: inputs.arch == 'nt'
- if: inputs.hostos == 'nt'
name: Bootstrap
run: ${{ inputs.bldscript }} ${{ inputs.tools }}
env:
Expand All @@ -56,17 +61,17 @@ runs:
shell: cmd
- uses: "./.github/actions/artfsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'bld watcom binbuild'
artifact: "bld watcom ${{ inputs.arch }}"
artifact: "bld watcom ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
noarchive: ${{ inputs.noarchive }}
owdebug: ${{ inputs.owdebug }}
- uses: "./.github/actions/artfsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'build binbuild'
artifact: "build ${{ inputs.arch }}"
artifact: "build ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
noarchive: ${{ inputs.noarchive }}
owdebug: ${{ inputs.owdebug }}
35 changes: 20 additions & 15 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: build
description: 'Process OW build'
inputs:
arch:
hostos:
description: 'host os'
required: false
default: ''
type: string
suffix:
description: 'run-time platform'
required: false
default: ''
Expand Down Expand Up @@ -31,22 +36,22 @@ runs:
steps:
- uses: "./.github/actions/dosboxin"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
- uses: "./.github/actions/artfload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'bld watcom binbuild'
artifact: "bld watcom ${{ inputs.arch }}"
artifact: "bld watcom ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
owdebug: ${{ inputs.owdebug }}
- uses: "./.github/actions/artfload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'build binbuild'
artifact: "build ${{ inputs.arch }}"
artifact: "build ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
owdebug: ${{ inputs.owdebug }}
- if: inputs.arch == 'lnx'
- if: inputs.hostos == 'lnx'
name: Build
run: ${{ inputs.bldscript }} ${{ inputs.tools }}
env:
Expand All @@ -57,7 +62,7 @@ runs:
OWDEBUG: ${{ inputs.owdebug }}
OWVERBOSE: 1
shell: bash
- if: inputs.arch == 'nt'
- if: inputs.hostos == 'nt'
name: Build
run: ${{ inputs.bldscript }} ${{ inputs.tools }}
env:
Expand All @@ -69,7 +74,7 @@ runs:
OWDEBUG: ${{ inputs.owdebug }}
OWVERBOSE: 1
shell: cmd
- if: inputs.arch == 'osx'
- if: inputs.hostos == 'osx'
name: Build
run: ${{ inputs.bldscript }} ${{ inputs.tools }}
env:
Expand All @@ -80,19 +85,19 @@ runs:
OWDEBUG: ${{ inputs.owdebug }}
OWVERBOSE: 1
shell: bash
- if: inputs.arch == 'lnx' || inputs.arch == 'nt'
- if: inputs.hostos == 'lnx' || inputs.hostos == 'nt'
uses: "./.github/actions/artfsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'rel'
artifact: "rel ${{ inputs.arch }}"
artifact: "rel ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
owdebug: ${{ inputs.owdebug }}
- if: inputs.arch == 'lnx' || inputs.arch == 'nt'
- if: inputs.hostos == 'lnx' || inputs.hostos == 'nt'
uses: "./.github/actions/artfsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'bld setupgui'
artifact: "bld setupgui ${{ inputs.arch }}"
artifact: "bld setupgui ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
owdebug: ${{ inputs.owdebug }}
15 changes: 10 additions & 5 deletions .github/actions/docbuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ inputs:
required: false
default: ''
type: string
arch:
hostos:
description: 'host os'
required: false
default: ''
type: string
suffix:
description: 'run-time platform'
required: false
default: ''
Expand Down Expand Up @@ -46,12 +51,12 @@ runs:
steps:
- uses: "./.github/actions/dosboxin"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
- uses: "./.github/actions/artfload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'build binbuild'
artifact: "build ${{ inputs.arch }}"
artifact: "build ${{ inputs.suffix }}"
tools: ${{ inputs.tools }}
noarchive: ${{ inputs.noarchive }}
owdebug: ${{ inputs.owdebug }}
Expand All @@ -69,7 +74,7 @@ runs:
shell: cmd
- uses: "./.github/actions/artfsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: ${{ inputs.gitpath }}
artifact: "rel ${{ inputs.target }}"
tools: ${{ inputs.tools }}
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/dosboxin/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: dosbox-instalation
description: 'Install DOSBOX run-time if necessary'
inputs:
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
runs:
using: composite
steps:
- if: inputs.arch == 'lnx'
- if: inputs.hostos == 'lnx'
name: Install DOSBOX
run: |
for i in {1..3}
Expand All @@ -21,7 +21,7 @@ runs:
fi
done
shell: bash
- if: inputs.arch == 'osx'
- if: inputs.hostos == 'osx'
name: Install DOSBOX-X
run: brew install dosbox-x
shell: bash
6 changes: 3 additions & 3 deletions .github/actions/ghassets/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: github-release-assets
description: 'Upload release asset file (day and month release)'
inputs:
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
Expand Down Expand Up @@ -41,7 +41,7 @@ runs:
steps:
- uses: "./.github/actions/artfload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
artifact: "install ${{ inputs.target }}"
gitpath: 'temp'
owdebug: ${{ inputs.owdebug }}
Expand Down
34 changes: 17 additions & 17 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ inputs:
required: false
default: ''
type: string
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
Expand Down Expand Up @@ -39,40 +39,40 @@ inputs:
runs:
using: composite
steps:
- if: inputs.arch == 'lnx'
- if: inputs.hostos == 'lnx'
uses: "./.github/actions/artfload"
with:
arch: 'lnx'
hostos: ${{ inputs.hostos }}
gitpath: 'build binbuild'
artifact: 'build lnx'
artifact: 'build lnx-x64'
tools: ${{ inputs.tools_lnx }}
owdebug: ${{ inputs.owdebug }}
- if: inputs.arch == 'nt'
- if: inputs.hostos == 'nt'
uses: "./.github/actions/artfload"
with:
arch: 'nt'
hostos: ${{ inputs.hostos }}
gitpath: 'build binbuild'
artifact: 'build nt'
artifact: 'build nt-x64'
tools: ${{ inputs.tools_nt }}
owdebug: ${{ inputs.owdebug }}
- uses: "./.github/actions/artfload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'bld setupgui'
artifact: 'bld setupgui nt'
artifact: 'bld setupgui nt-x64'
tools: ${{ inputs.tools_nt }}
owdebug: ${{ inputs.owdebug }}
- uses: "./.github/actions/artfload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'bld setupgui'
artifact: 'bld setupgui lnx'
artifact: 'bld setupgui lnx-x64'
tools: ${{ inputs.tools_lnx }}
owdebug: ${{ inputs.owdebug }}
# load all release binaries
- uses: "./.github/actions/relload"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'rel'
tools_nt: ${{ inputs.tools_nt }}
tools_lnx: ${{ inputs.tools_lnx }}
Expand All @@ -82,11 +82,11 @@ runs:
id: owsnapshot
uses: "./.github/actions/snapshot"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'rel'
owdebug: ${{ inputs.owdebug }}
# run build script
- if: inputs.target != 'snapshot' && ( inputs.arch == 'lnx' )
- if: inputs.target != 'snapshot' && ( inputs.hostos == 'lnx' )
name: Build Installers
run: ${{ inputs.bldscript }} ${{ inputs.tools_lnx }}
env:
Expand All @@ -97,7 +97,7 @@ runs:
OWINSTTARGET: ${{ inputs.target }}
OWVERBOSE: 1
shell: bash
- if: inputs.target != 'snapshot' && inputs.arch == 'nt'
- if: inputs.target != 'snapshot' && inputs.hostos == 'nt'
name: Build Installers
run: ${{ inputs.bldscript }} ${{ inputs.tools_nt }}
env:
Expand All @@ -112,7 +112,7 @@ runs:
# full content of directory, cannot specify files
- uses: "./.github/actions/artfsave"
with:
arch: ${{ inputs.arch }}
hostos: ${{ inputs.hostos }}
gitpath: 'distrib ow bin'
artifact: "install ${{ inputs.target }}"
owdebug: ${{ inputs.owdebug }}
4 changes: 2 additions & 2 deletions .github/actions/lastbld/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: last-build
description: 'Create new OW release on GitHub and upload snapshot archive'
inputs:
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: release
description: 'Create new day and month Release on GitHub'
inputs:
arch:
description: 'run-time platform'
hostos:
description: 'host os'
required: false
default: ''
type: string
Expand Down
Loading

0 comments on commit bb97049

Please sign in to comment.