build(docker): bump alpine from 3.19 to 3.20 #40
Workflow file for this run
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
name: Test on Ubuntu | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
unit-cmake: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt update | |
- run: sudo apt install -y build-essential ninja-build libgtest-dev libcurl4-openssl-dev libncursesw5-dev libssl-dev nlohmann-json3-dev zlib1g-dev | |
- name: Checkout libTorrent | |
uses: actions/checkout@v3 | |
with: | |
repository: elegant996/libtorrent | |
path: libtorrent | |
- name: Install libTorrent | |
run: | | |
cmake -GNinja -S libtorrent -B libtorrent | |
cmake --build libtorrent | |
sudo cmake --install libtorrent | |
sudo ldconfig | |
- run: cmake -B build -DCMAKE_INSTALL_PREFIX=install -GNinja . | |
- run: cmake --build build | |
- run: cmake --install build | |
- run: cd build && ctest --verbose | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: rtorrent-linux-cmake | |
path: install/ | |
unit-bazel: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt update | |
- run: sudo apt install -y build-essential | |
- run: sudo wget https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -O /usr/local/bin/bazel | |
- run: sudo chmod +x /usr/local/bin/bazel | |
- run: bazel coverage --instrument_test_targets --collect_code_coverage --combined_report=lcov --test_output=all //... | |
- uses: codecov/codecov-action@v1 | |
with: | |
directory: ./bazel-out/_coverage | |
unit-bazel-clang: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Clang | |
run: | | |
ubuntu_codename=`lsb_release -c | cut -f2` | |
wget https://apt.llvm.org/llvm-snapshot.gpg.key | |
sudo apt-key add llvm-snapshot.gpg.key | |
sudo add-apt-repository "deb http://apt.llvm.org/$ubuntu_codename/ llvm-toolchain-$ubuntu_codename-$LLVM_VERSION main" | |
sudo apt-get update | |
sudo apt-get install -y clang-$LLVM_VERSION llvm-$LLVM_VERSION lld-$LLVM_VERSION | |
sudo ln -sf /usr/bin/clang-$LLVM_VERSION /usr/bin/clang | |
sudo ln -sf /usr/bin/ld.lld-$LLVM_VERSION /usr/bin/ld.lld | |
sudo ln -sf /usr/bin/llvm-ar-$LLVM_VERSION /usr/bin/llvm-ar | |
sudo ln -sf /usr/bin/llvm-nm-$LLVM_VERSION /usr/bin/llvm-nm | |
sudo ln -sf /usr/bin/llvm-objcopy-$LLVM_VERSION /usr/bin/llvm-objcopy | |
sudo ln -sf /usr/bin/llvm-objdump-$LLVM_VERSION /usr/bin/llvm-objdump | |
sudo ln -sf /usr/bin/llvm-strip-$LLVM_VERSION /usr/bin/llvm-strip | |
sudo ln -sf /usr/bin/llvm-config-$LLVM_VERSION /usr/bin/llvm-config | |
env: | |
LLVM_VERSION: 11 | |
- run: sudo apt update | |
- run: sudo apt install -y build-essential | |
- run: sudo wget https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 -O /usr/local/bin/bazel | |
- run: sudo chmod +x /usr/local/bin/bazel | |
- run: bazel test --config=clang -s //... | |
- run: bazel build --config=clang -s rtorrent-deb | |
- run: cp -L bazel-bin/rtorrent-deb.deb rtorrent.deb | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: rtorrent-deb-glibc-amd64 | |
path: rtorrent.deb | |
end-to-end: | |
needs: unit-bazel-clang | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Copy rTorrent built in previous job | |
uses: actions/download-artifact@v2 | |
with: | |
name: rtorrent-deb-glibc-amd64 | |
- name: Install rTorrent | |
run: | | |
sudo dpkg -i rtorrent.deb | |
rm rtorrent.deb | |
- name: Checkout Flood | |
run: | | |
git clone --depth 1 --branch master https://github.com/jesec/flood.git . | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
- name: Build NPM with performant dependencies | |
run: | | |
npm i -g pnpm | |
pnpm i --frozen-lockfile | |
npm run build | |
- name: End-to-end test rTorrent with Flood's test suite | |
uses: nick-invision/retry@v2 | |
with: | |
max_attempts: 5 | |
timeout_minutes: 30 | |
command: npm t -- --selectProjects rtorrent --runTestsByPath server/routes/api/torrents.test.ts server/routes/api/client.test.ts |