Add Linux to intro #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CommonsBase_Std.Coreutils # we'll build this object | |
| env: | |
| LIBRARY_VERSION: 0.2.2 # 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: | |
| windows-dependencies: # job to build dependencies that only run on Windows (until we have first-class GitHub Actions support) | |
| runs-on: windows-2022 | |
| 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 Windows objects | |
| 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 -d parsetrace get-object CommonsBase_Std.S7z@25.1.0 -s Release.Windows_x86 -d target/ignore | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| - name: Build ${{ github.workflow }} on Windows | |
| shell: pwsh | |
| # `--trial` helps cross-platform CI caches behave best since cache+data is under the project directory | |
| run: | | |
| 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 ./coreutils.exe -f target/Release.Darwin_arm64.coreutils.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 ./coreutils.exe -f target/Release.Darwin_x86_64.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Linux_arm64_gnu.coreutils.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 ./coreutils.exe -f target/Release.Linux_arm64.coreutils.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 ./coreutils.exe -f target/Release.Linux_arm.coreutils.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 ./coreutils.exe -f target/Release.Linux_x86.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Linux_x86_gnu.coreutils.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 ./coreutils.exe -f target/Release.Linux_x86_64.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Linux_x86_64_gnu.coreutils.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_arm64 -m ./coreutils.exe -f target/Release.Windows_arm64.coreutils.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 ./coreutils.exe -f target/Release.Windows_x86.coreutils.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 ./coreutils.exe -f target/Release.Windows_x86_64.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Windows_x86_64_gnu.coreutils.exe | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| build: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| TEST_SLOT: Release.Linux_x86_64 # we'll test the build on this slot | |
| needs: windows-dependencies | |
| 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 | |
| # We built these on Windows, but we redo build on Linux to verify that dependencies are in | |
| # tracestore and valuestore, and to extra Linux coreutils.exe for testing. | |
| - 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 ./coreutils.exe -f target/Release.Darwin_arm64.coreutils.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 ./coreutils.exe -f target/Release.Darwin_x86_64.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Linux_arm64_gnu.coreutils.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 ./coreutils.exe -f target/Release.Linux_arm64.coreutils.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 ./coreutils.exe -f target/Release.Linux_arm.coreutils.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 ./coreutils.exe -f target/Release.Linux_x86.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Linux_x86_gnu.coreutils.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 ./coreutils.exe -f target/Release.Linux_x86_64.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Linux_x86_64_gnu.coreutils.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_arm64 -m ./coreutils.exe -f target/Release.Windows_arm64.coreutils.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 ./coreutils.exe -f target/Release.Windows_x86.coreutils.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 ./coreutils.exe -f target/Release.Windows_x86_64.coreutils.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_gnu -m ./coreutils.exe -f target/Release.Windows_x86_64_gnu.coreutils.exe | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| - name: Test ${{ github.workflow }} | |
| run: target/${{ env.TEST_SLOT }}.coreutils.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.coreutils.exe | |
| # target/Release.Darwin_x86_64.coreutils.exe | |
| # target/Release.Linux_arm64_gnu.coreutils.exe | |
| # target/Release.Linux_arm64.coreutils.exe | |
| # target/Release.Linux_arm.coreutils.exe | |
| # target/Release.Linux_x86.coreutils.exe | |
| # target/Release.Linux_x86_gnu.coreutils.exe | |
| # target/Release.Linux_x86_64.coreutils.exe | |
| # target/Release.Linux_x86_64_gnu.coreutils.exe | |
| # target/Release.Windows_arm64.coreutils.exe | |
| # target/Release.Windows_x86.coreutils.exe | |
| # target/Release.Windows_x86_64.coreutils.exe | |
| # target/Release.Windows_x86_64_gnu.coreutils.exe |