Skip to content

Commit

Permalink
ci(napi): revert to using ubuntu-20.04 for linux builds (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximousblk committed Feb 19, 2023
1 parent 0872c14 commit 659d35d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/napi.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-20.04, windows-latest, macos-latest]
node: [14, 16]
include:
- os: macos-latest
Expand All @@ -33,7 +33,7 @@ jobs:
build: yarn build-release
use_sysroot: false

- os: ubuntu-latest
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
arch: x64
build: yarn build --release
Expand All @@ -52,7 +52,7 @@ jobs:
cache-dependency-path: js/napi/yarn.lock

- uses: dtolnay/rust-toolchain@stable

- name: Use Rust Cache
uses: Swatinem/rust-cache@v1

Expand All @@ -62,15 +62,15 @@ jobs:
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get remove --purge -y man-db
# Install clang-15, lld-15, and debootstrap.
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-focal-15.list
# Install clang-14, lld-14, and debootstrap.
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-focal-14.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15
sudo apt-get install --no-install-recommends debootstrap \
clang-14 lld-14
# Create ubuntu-16.04 sysroot environment, which is used to avoid
# depending on a very recent version of glibc.
# `libc6-dev` is required for building any C source files.
Expand All @@ -93,8 +93,8 @@ jobs:
CARGO_PROFILE_RELEASE_LTO=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C linker=clang-14
-C link-arg=-fuse-ld=lld-14
-C link-arg=--sysroot=/sysroot
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
Expand All @@ -103,15 +103,15 @@ jobs:
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C linker=clang-14
-C link-arg=-fuse-ld=lld-14
-C link-arg=--sysroot=/sysroot
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
${{ env.RUSTFLAGS }}
__1
CC=clang-15
CC=clang-14
CFLAGS=-flto=thin --sysroot=/sysroot
__0
Expand Down

0 comments on commit 659d35d

Please sign in to comment.