Skip to content

Commit 5b031c1

Browse files
authored
[CI] avoid apt 404 errors by calling apt update (#322)
apt can be flaky with old packages (as in updated but not yet in the local database). The only reliable fix I know of is to always update the database ...
1 parent 4b94ca3 commit 5b031c1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- name: dependencies
1818
run: |
19+
sudo apt update
1920
sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
2021
pip3 install colorama
2122
- name: Resolve prereqs path
@@ -46,6 +47,7 @@ jobs:
4647
- uses: actions/checkout@v4
4748
- name: dependencies
4849
run: |
50+
sudo apt update
4951
sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
5052
pip3 install colorama
5153
- name: Resolve prereqs path
@@ -169,6 +171,7 @@ jobs:
169171
- uses: actions/checkout@v4
170172
- name: dependencies
171173
run: |
174+
sudo apt update
172175
sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
173176
pip3 install colorama
174177
- name: Resolve prereqs path
@@ -270,6 +273,7 @@ jobs:
270273
- uses: actions/checkout@v4
271274
- name: dependencies
272275
run: |
276+
sudo apt update
273277
sudo apt install gcc-10 g++-10 libgcc-10-dev libunwind8-dev ninja-build
274278
pip3 install colorama
275279
- name: Resolve prereqs path
@@ -371,7 +375,7 @@ jobs:
371375
steps:
372376
- uses: actions/checkout@v4
373377
- name: dependencies
374-
run: sudo apt install gcc-11 g++-11 libgcc-11-dev ninja-build
378+
run: sudo apt update && sudo apt install gcc-11 g++-11 libgcc-11-dev ninja-build
375379
- name: build
376380
run: |
377381
mkdir -p build
@@ -683,6 +687,7 @@ jobs:
683687
key: prereqs-unittest-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('ci/setup-prerequisites-unittest.sh') }}
684688
- name: dependencies
685689
run: |
690+
sudo apt update
686691
sudo apt install gcc-10 g++-10 libgcc-10-dev ninja-build libc++-dev ninja-build ccache
687692
cd ..
688693
cpptrace/ci/setup-prerequisites-unittest.sh
@@ -711,6 +716,7 @@ jobs:
711716
- uses: actions/checkout@v4
712717
- name: dependencies
713718
run: |
719+
sudo apt update
714720
sudo apt install -y libtool libncurses5
715721
- name: test dbg
716722
run: |
@@ -747,6 +753,7 @@ jobs:
747753
key: prereqs-unittest-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('ci/setup-prerequisites-unittest.sh') }}
748754
- name: dependencies
749755
run: |
756+
sudo apt update
750757
sudo apt install gcc-10 g++-10 libgcc-10-dev ninja-build libc++-dev ninja-build ccache
751758
cd ..
752759
cpptrace/ci/setup-prerequisites-unittest.sh
@@ -847,6 +854,7 @@ jobs:
847854
- uses: actions/checkout@v4
848855
- name: dependencies
849856
run: |
857+
sudo apt update
850858
sudo apt install ninja-build clang-19 clang-tools-19
851859
- name: build and test
852860
run: |

0 commit comments

Comments
 (0)