Skip to content

Commit 51e3252

Browse files
ono-maxhsbt
authored andcommitted
Resolve a warning in launchable record build command
1 parent f05ad37 commit 51e3252

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

.github/actions/launchable/record-test/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,21 @@ inputs:
1919
Test options that determine how tests are run.
2020
This value is used in the Launchable flavor.
2121
22+
srcdir:
23+
required: false
24+
default: ${{ github.workspace }}
25+
description: >-
26+
Directory to (re-)checkout source codes. Launchable retrives the commit information
27+
from the directory.
28+
2229
outputs: {} # nothing?
2330

2431
runs:
2532
using: composite
2633

2734
steps:
2835
- name: Launchable - record tests
29-
working-directory: ${{ inputs.builddir }}
36+
working-directory: ${{ inputs.srcdir }}
3037
shell: bash
3138
run: |
3239
test_opts="$(echo ${{ inputs.test-opts }} | sed 's/=/:/g' | sed 's/ //g')"

.github/actions/launchable/setup/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ inputs:
1414
Launchable token is needed if you want to run Launchable on your forked repository.
1515
See https://github.com/ruby/ruby/wiki/CI-Servers#launchable-ci for details.
1616
17+
srcdir:
18+
required: false
19+
default: ${{ github.workspace }}
20+
description: >-
21+
Directory to (re-)checkout source codes. Launchable retrives the commit information
22+
from the directory.
23+
1724
outputs:
1825
enable-launchable:
1926
description: "The boolean value indicating whether Launchable is enabled or not"
@@ -66,6 +73,7 @@ runs:
6673

6774
- name: Set up Launchable
6875
shell: bash
76+
working-directory: ${{ inputs.srcdir }}
6977
run: |
7078
set -x
7179
PATH=$PATH:$(python -msite --user-base)/bin

.github/actions/setup/directories/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ inputs:
4444
description: >-
4545
If set to true, creates dummy files in build dir.
4646
47+
fetch-depth:
48+
required: false
49+
default: '1'
50+
description: The depth of commit history fetched from the remote repository
51+
4752
outputs: {} # nothing?
4853

4954
runs:
@@ -79,6 +84,7 @@ runs:
7984
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8085
with:
8186
path: ${{ inputs.srcdir }}
87+
fetch-depth: ${{ inputs.fetch-depth }}
8288

8389
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
8490
with:

.github/workflows/macos.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ jobs:
5656
with:
5757
sparse-checkout-cone-mode: false
5858
sparse-checkout: /.github
59-
# Set fetch-depth: 0 so that Launchable can receive commits information.
60-
fetch-depth: 0
6159

6260
- name: Install libraries
6361
uses: ./.github/actions/setup/macos
@@ -68,6 +66,8 @@ jobs:
6866
builddir: build
6967
makeup: true
7068
dummy-files: ${{ matrix.test_task == 'check' }}
69+
# Set fetch-depth: 0 so that Launchable can receive commits information.
70+
fetch-depth: 10
7171

7272
- name: Run configure
7373
run: ../src/configure -C --disable-install-doc
@@ -89,6 +89,7 @@ jobs:
8989
uses: ./.github/actions/launchable/setup
9090
with:
9191
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
92+
srcdir: src
9293

9394
- name: Set extra test options
9495
run: echo "TESTS=$TESTS ${{ matrix.test_opts }}" >> $GITHUB_ENV
@@ -118,9 +119,10 @@ jobs:
118119
with:
119120
# We need to configure the `build` directory because
120121
# this composite action is executed in the default working directory.
121-
report-path: build/launchable_reports.json
122+
report-path: ../build/launchable_reports.json
122123
os: ${{ matrix.os }}
123124
test-opts: ${{ matrix.test_opts }}
125+
srcdir: src
124126
if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
125127

126128
- uses: ./.github/actions/slack

.github/workflows/ubuntu.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
builddir: build
7070
makeup: true
7171
dummy-files: ${{ matrix.test_task == 'check' }}
72+
# Set fetch-depth: 10 so that Launchable can receive commits information.
73+
fetch-depth: 10
7274

7375
- uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
7476
with:
@@ -100,6 +102,7 @@ jobs:
100102
uses: ./.github/actions/launchable/setup
101103
with:
102104
launchable-token: ${{ secrets.LAUNCHABLE_TOKEN }}
105+
srcdir: src
103106

104107
- name: make ${{ matrix.test_task }}
105108
run: >-
@@ -126,9 +129,10 @@ jobs:
126129
with:
127130
# We need to configure the `build` directory because
128131
# this composite action is executed in the default working directory.
129-
report-path: build/launchable_reports.json
132+
report-path: ../build/launchable_reports.json
130133
os: ubuntu-20.04
131134
test-opts: ${{ matrix.configure }}
135+
srcdir: src
132136
if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
133137

134138
- uses: ./.github/actions/slack

0 commit comments

Comments
 (0)