# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Test C++
on:
  workflow_dispatch:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
    paths:
    - '.github/workflows/test-lang-c\+\+.yml'
    - 'lang/c\+\+/**'

defaults:
  run:
    working-directory: lang/c++

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install Dependencies
        run: sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake

      - name: Clean
        run: ./build.sh clean

      - name: Lint
        run: ./build.sh lint

      - name: Test
        run: ./build.sh test

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Test C++
on:
  workflow_dispatch:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
    paths:
    - '.github/workflows/test-lang-c\+\+.yml'
    - 'lang/c\+\+/**'

defaults:
  run:
    working-directory: lang/c++

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Install Dependencies
        run: sudo apt update && sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake

      - name: Clean
        run: ./build.sh clean

      - name: Lint
        run: ./build.sh lint

      - name: Test
        run: ./build.sh test

Update from the Ubuntu repositories before installing the dependencies
Update from the Ubuntu repositories before installing the dependencies

Try to fix:

Run sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/n/nvidia-settings/libxnvctrl0_470.57.01-0ubuntu0.20.04.2_amd64.deb  404  Not Found [IP: 52.250.76.244 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

The problem is that there is no .deb for 20.04.2, but only for 20.04.1
and 20.04.3

see https://github.com/apache/avro/runs/5279907468?check_suite_focus=true

Signed-off-by: Martin Tzvetanov Grigorov <467ed6115092226a07ff6116d483984b94cf27b9@apache.org>
