Skip to content

Merge pull request #74 from jonahbeckford/V2_4 #55

Merge pull request #74 from jonahbeckford/V2_4

Merge pull request #74 from jonahbeckford/V2_4 #55

name: CommonsBase_Std.S7z # we'll build this object
env:
LIBRARY_VERSION: 25.1.0 # we'll build this version
on:
push: # build on every commit
workflow_dispatch: # allow manual triggering from GitHub page
workflow_call: # allow other workflows to call this workflow
jobs:
build:
# Your job will be different, but this job needs Windows since CommonsBase_Std.S7z.MacLinux7zExe has OSFamily=windows.
runs-on: windows-2022
env:
TEST_SLOT: Release.Windows_x86_64 # we'll test the build on this slot
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Checkout # get dksrc/dk0
uses: actions/checkout@v5
with: { repository: diskuv/dk, path: dksrc, ref: V2_4 }
- name: Cache dk data stores and build keys
uses: actions/cache@v4
with:
# The data stores and build keys are safe to share between Windows, macOS and Linux
enableCrossOsArchive: true
path: |
t/d/val.1
t/d/cts.1.*
t/c/build.pub
t/c/build.sec
restore-keys: dk-stores-and-keys # use latest cache
key: dk-stores-and-keys-${{ github.run_id }} # update cache on every run
- name: Build ${{ github.workflow }}
shell: pwsh
# `--trial` helps cross-platform CI caches behave best since cache+data is under the project directory
run: |
dksrc/dk0 --trial --print-config
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Darwin_arm64 -m ./LICENSE -f target/LICENSE
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Darwin_arm64 -m ./7zz.exe -f target/Release.Darwin_arm64.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Darwin_x86_64 -m ./7zz.exe -f target/Release.Darwin_x86_64.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Linux_arm -m ./7zz.exe -f target/Release.Linux_arm.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Linux_arm64 -m ./7zz.exe -f target/Release.Linux_arm64.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Linux_x86 -m ./7zz.exe -f target/Release.Linux_x86.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Linux_x86_64 -m ./7zz.exe -f target/Release.Linux_x86_64.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Windows_x86 -m ./7zz.exe -f target/Release.Windows_x86.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dksrc/dk0 --trial -v -nosysinc -I etc/dk/v --trust-local-package CommonsBase_Std get-object ${{ github.workflow }}@${{ env.LIBRARY_VERSION }} -s Release.Windows_x86_64 -m ./7zz.exe -f target/Release.Windows_x86_64.7zz.exe
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Test ${{ github.workflow }}
run: target/${{ env.TEST_SLOT }}.7zz.exe --help
# Create release if and only if tag is pushed
# - name: Release ${{ github.workflow }}
# uses: softprops/action-gh-release@v2
# if: github.ref_type == 'tag'
# with:
# files: |
# target/LICENSE
# target/Release.Darwin_arm64.7zz.exe
# target/Release.Darwin_x86_64.7zz.exe
# target/Release.Linux_arm.7zz.exe
# target/Release.Linux_arm64.7zz.exe
# target/Release.Linux_x86.7zz.exe
# target/Release.Linux_x86_64.7zz.exe
# target/Release.Windows_x86.7zz.exe
# target/Release.Windows_x86_64.7zz.exe