-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
294 additions
and
119 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Task | ||
description: Run task | ||
inputs: | ||
name: | ||
description: task name | ||
required: true | ||
output: | ||
description: pattern of output files | ||
required: true | ||
image: | ||
description: docker image | ||
dep1_name: | ||
description: name of the first dependency | ||
dep1_artifact: | ||
description: name of the artifact from the first dependency | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Docker image key | ||
if: ${{ runner.os == 'Linux' && inputs.image }} | ||
id: image-key | ||
shell: bash | ||
run: | | ||
echo key=$(python3 CI/run.py --route "docker image: ${{ inputs.image }}") >> $GITHUB_OUTPUT | ||
- name: Dependency key | ||
if: ${{ inputs.dep1_name }} | ||
id: dep1-key | ||
shell: bash | ||
run: | | ||
echo key=$(python3 CI/run.py --route "${{ inputs.dep1_name }}") >> $GITHUB_OUTPUT | ||
- name: Artifact key | ||
id: artifact-key | ||
shell: bash | ||
run: | | ||
echo key=$(python3 CI/run.py --route "${{ inputs.name }}") >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: ${{ inputs.output }} | ||
key: ${{ steps.artifact-key.outputs.key }} | ||
enableCrossOsArchive: true | ||
- uses: actions/cache/restore@v4 | ||
if: ${{ runner.os == 'Linux' && inputs.image && steps.cache.outputs.cache-hit != 'true' }} | ||
with: | ||
path: dockerImage.tar.zst | ||
key: ${{ steps.image-key.outputs.key }} | ||
- uses: actions/cache/restore@v4 | ||
if: ${{ inputs.dep1_name && steps.cache.outputs.cache-hit != 'true' }} | ||
with: | ||
path: ${{ inputs.dep1_artifact }} | ||
key: ${{ steps.dep1-key.outputs.key }} | ||
enableCrossOsArchive: true | ||
- name: Prepare podman cache | ||
if: ${{ runner.os == 'Linux' && inputs.image && steps.cache.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: | | ||
mkdir -p "cache/${{ steps.image-key.outputs.key }}/public" | ||
mv dockerImage.tar.zst "cache/${{ steps.image-key.outputs.key }}/public" | ||
- name: Prepare dependency cache | ||
if: ${{ inputs.dep1_name && steps.cache.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: | | ||
mkdir -p "cache/${{ steps.dep1-key.outputs.key }}/public" | ||
mv ${{ inputs.dep1_artifact }} "cache/${{ steps.dep1-key.outputs.key }}/public" | ||
- name: ${{ inputs.name }} | ||
shell: bash | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
run: | | ||
python3 CI/run.py --cache cache --out . "${{ inputs.name }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# TODO: https://stackoverflow.com/questions/59180385/using-an-array-of-values-to-repeat-a-step-in-github-actions-workflow | ||
name: environment and tools | ||
on: [push] | ||
jobs: | ||
docker-base: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/task | ||
with: | ||
name: "docker image: base" | ||
output: dockerImage.tar.zst | ||
|
||
docker: | ||
needs: docker-base | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- build | ||
- build-tools | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/task | ||
with: | ||
name: "docker image: ${{ matrix.image }}" | ||
output: dockerImage.tar.zst | ||
image: base | ||
|
||
msys-base: | ||
runs-on: ubuntu-latest | ||
needs: docker-base | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/task | ||
with: | ||
name: "msys2 image: base x86_64" | ||
output: msys2.tar.zst | ||
image: base | ||
|
||
msys: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- build | ||
- test | ||
runs-on: windows-latest | ||
needs: msys-base | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/task | ||
with: | ||
name: "msys2 image: ${{ matrix.image }} x86_64" | ||
output: msys2.tar.zst | ||
image: build-tools | ||
dep1_name: "msys2 image: base x86_64" | ||
dep1_artifact: msys2.tar.zst | ||
|
||
git: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- 1.8.5 | ||
- 2.7.4 | ||
- 2.47.1 | ||
- 2.47.1.windows.1 windows x86_64 | ||
runs-on: ubuntu-latest | ||
needs: docker | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/task | ||
with: | ||
name: git v${{ matrix.version }} | ||
output: git-*.tar.zst | ||
image: build-tools | ||
|
||
mercurial: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
image: [build-tools] | ||
version: | ||
- 1.9.3 | ||
- 2.5.4 | ||
- 3.4.2 | ||
- 6.8 | ||
include: | ||
- os: windows-latest | ||
version: 6.8 windows x86_64 | ||
dep1_name: "msys2 image: build x86_64" | ||
dep1_artifact: msys2.tar.zst | ||
- os: macos-13 | ||
version: 6.8 macos x86_64 | ||
- os: macos-14 | ||
version: 6.8 macos arm64 | ||
runs-on: ${{ matrix.os }} | ||
needs: [docker, msys] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/task | ||
with: | ||
name: hg v${{ matrix.version }} | ||
output: mercurial-*.whl | ||
image: ${{ matrix.image }} | ||
dep1_name: ${{ matrix.dep1_name }} | ||
dep1_artifact: ${{ matrix.dep1_artifact }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.