@@ -15,35 +15,7 @@ defaults:
1515    shell : bash 
1616
1717jobs :
18-   changelog :
19-     runs-on : ubuntu-latest 
20- 
21-     steps :
22-     - name : Checkout 
23-       uses : actions/checkout@v4 
24-       with :
25-         ref : ${{ github.ref }} 
26- 
27-     #  Run
28-     - name : Check Changelog 
29-       run : | 
30-         MESSAGE=$(git log --format=%B -n 1) 
31-         PR=$(echo "$MESSAGE" | grep -o "#[0-9]*" | head -1 | sed -e 's/^#//') 
32-         body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \ 
33-           python -c "import sys, json; print(json.load(sys.stdin)['body'])") 
34-         output=$(grep "^changelog:\s*\S" <<< "$body" | sed "s/changelog:\s*//g") || { 
35-           echo "ERROR: PR body must contain 'changelog: ...'" 
36-           exit 1 
37-         } 
38-         if [[ "$output" = "none" ]]; then 
39-           echo "WARNING: changelog is 'none'" 
40-         else 
41-           echo "changelog: $output" 
42-         fi 
43- env :
44-         PYTHONIOENCODING : ' utf-8' 
4518  base :
46-     needs : changelog 
4719    strategy :
4820      matrix :
4921        include :
6335    #  Setup
6436    - name : Checkout 
6537      uses : actions/checkout@v4 
38+       with :
39+         persist-credentials : false 
6640
6741    - name : Install i686 dependencies 
6842      if : matrix.host == 'i686-unknown-linux-gnu' 
7448name : Install toolchain 
7549      run : | 
7650        rustup set default-host ${{ matrix.host }} 
77-         rustup show active-toolchain 
51+         # Use a way compatible with Rustup pre-1.28.0 and Rustup 1.28.0 
52+         rustup show active-toolchain || rustup toolchain install 
7853
7954#  Run
8055    - name : Build 
@@ -114,31 +89,37 @@ jobs:
11489        OS : ${{ runner.os }} 
11590
11691  metadata_collection :
117-     needs : changelog 
11892    runs-on : ubuntu-latest 
11993
12094    steps :
12195     #  Setup
12296    - name : Checkout 
12397      uses : actions/checkout@v4 
98+       with :
99+         persist-credentials : false 
124100
125101    - name : Install toolchain 
126-       run : rustup show active-toolchain 
102+       run : | 
103+         # Use a way compatible with Rustup pre-1.28.0 and Rustup 1.28.0 
104+         rustup show active-toolchain || rustup toolchain install 
127105
128106name : Test metadata collection 
129107      run : cargo collect-metadata 
130108
131109  integration_build :
132-     needs : changelog 
133110    runs-on : ubuntu-latest 
134111
135112    steps :
136113    #  Setup
137114    - name : Checkout 
138115      uses : actions/checkout@v4 
116+       with :
117+         persist-credentials : false 
139118
140119    - name : Install toolchain 
141-       run : rustup show active-toolchain 
120+       run : | 
121+         # Use a way compatible with Rustup pre-1.28.0 and Rustup 1.28.0 
122+         rustup show active-toolchain || rustup toolchain install 
142123
143124#  Run
144125    - name : Build Integration Test 
@@ -188,9 +169,13 @@ jobs:
188169    #  Setup
189170    - name : Checkout 
190171      uses : actions/checkout@v4 
172+       with :
173+         persist-credentials : false 
191174
192175    - name : Install toolchain 
193-       run : rustup show active-toolchain 
176+       run : | 
177+         # Use a way compatible with Rustup pre-1.28.0 and Rustup 1.28.0 
178+         rustup show active-toolchain || rustup toolchain install 
194179
195180#  Download
196181    - name : Download target dir 
@@ -205,13 +190,13 @@ jobs:
205190    #  Run
206191    - name : Test ${{ matrix.integration }} 
207192      run : | 
208-           TOOLCHAIN=$(rustup show active-toolchain | cut -f1 -d' ') 
193+           TOOLCHAIN=$(rustup show active-toolchain | head -n 1 |  cut -f1 -d' ') 
209194          rustup run $TOOLCHAIN $CARGO_TARGET_DIR/debug/integration --show-output 
210195env :
211196        INTEGRATION : ${{ matrix.integration }} 
212197
213198  conclusion :
214-     needs : [ changelog,  base, metadata_collection, integration_build, integration ] 
199+     needs : [ base, metadata_collection, integration_build, integration ] 
215200    #  We need to ensure this job does *not* get skipped if its dependencies fail,
216201    #  because a skipped job is considered a success by GitHub. So we have to
217202    #  overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
0 commit comments