Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura committed Sep 30, 2022
2 parents fc0639a + d99c37d commit 05ba49b
Show file tree
Hide file tree
Showing 46 changed files with 237 additions and 182 deletions.
47 changes: 22 additions & 25 deletions .github/workflows/docs.yml
@@ -1,38 +1,35 @@
name: Upload documentation
name: Upload documentation to GitHub Pages

on:
push:
branches:
- master

permissions: {}
jobs:
upload_docs:
permissions:
contents: write # for git push
# Sets permissions of `GITHUB_TOKEN` to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

name: Upload documentation
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
if: github.repository == 'rust-lang/libc'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TARGET=x86_64-unknown-linux-gnu sh ./ci/install-rust.sh
- name: Generate documentation
run: LIBC_CI=1 sh ci/dox.sh
- name: Deploy GitHub Pages
run: |
git worktree add gh-pages gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../target/doc/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'target/doc'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "libc"
version = "0.2.133"
version = "0.2.134"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/aarch64-linux-android/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN dpkg --add-architecture i386
RUN apt-get update
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/aarch64-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/aarch64-unknown-linux-musl/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/arm-linux-androideabi/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN dpkg --add-architecture i386
RUN apt-get update
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates \
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/arm-unknown-linux-musleabihf/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates qemu-system-arm curl \
Expand Down
5 changes: 3 additions & 2 deletions ci/docker/asmjs-unknown-emscripten/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

# This is a workaround to avoid the interaction with tzdata.
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -15,7 +15,8 @@ RUN apt-get install -y --no-install-recommends \
libxml2 \
python3 \
python3-distutils \
xz-utils
xz-utils \
bzip2

COPY emscripten.sh /
RUN bash /emscripten.sh
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/i686-linux-android/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN dpkg --add-architecture i386
RUN apt-get update
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/i686-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/i686-unknown-linux-musl/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN dpkg --add-architecture i386
RUN apt-get update
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mips-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mips-unknown-linux-musl/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mips64-unknown-linux-muslabi64/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc make libc6-dev git curl ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mipsel-unknown-linux-musl/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates qemu-system-mipsel curl \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/mipsel-unknown-linux-uclibc/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates qemu-system-mipsel curl \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/powerpc-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/s390x-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/s390x-unknown-linux-musl/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates \
Expand Down
1 change: 1 addition & 0 deletions ci/docker/sparc64-unknown-linux-gnu/Dockerfile
@@ -1,3 +1,4 @@
# FIXME: Update to 22.04 once Debian image of sparc64 has a newer glibc.
FROM ubuntu:20.04

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down
5 changes: 3 additions & 2 deletions ci/docker/wasm32-unknown-emscripten/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

# This is a workaround to avoid the interaction with tzdata.
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -21,7 +21,8 @@ RUN apt-get install -y --no-install-recommends \
cmake \
sudo \
gdb \
xz-utils
xz-utils \
bzip2

RUN ln -s /usr/bin/python3 /usr/bin/python & \
ln -s /usr/bin/pip3 /usr/bin/pip
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/wasm32-wasi/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/x86_64-linux-android/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-linux-gnu/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc libc6-dev ca-certificates linux-headers-generic
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-linux-gnux32/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc-multilib libc6-dev ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/x86_64-unknown-linux-musl/Dockerfile
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
Expand Down
25 changes: 5 additions & 20 deletions ci/emscripten.sh
Expand Up @@ -2,34 +2,19 @@

set -ex

EMSDK_VERSION=1.39.20

hide_output() {
set +x
on_err="
echo ERROR: An error was encountered with the build.
cat /tmp/build.log
exit 1
"
trap '$on_err' ERR
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
PING_LOOP_PID=$!
"${@}" &> /tmp/build.log
trap - ERR
kill $PING_LOOP_PID
rm -f /tmp/build.log
set -x
}
# FIXME: 3.1.21 removed a lot of header files (https://github.com/emscripten-core/emscripten/pull/17704).
# We have to tweak libc-test (and deprecate unsupported items, maybe) when updating emsdk.
EMSDK_VERSION=3.1.20

git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable
cd /emsdk-portable
hide_output ./emsdk install "${EMSDK_VERSION}"
./emsdk install "${EMSDK_VERSION}"
./emsdk activate "${EMSDK_VERSION}"

# Compile and cache libc
# shellcheck disable=SC1091
source ./emsdk_env.sh
echo "main(){}" > a.c
echo "int main() {return 0;}" > a.c
HOME=/emsdk-portable/ emcc a.c
rm -f a.*

Expand Down
2 changes: 1 addition & 1 deletion ci/linux-sparc64.sh
Expand Up @@ -5,7 +5,7 @@ set -ex
mkdir -m 777 /qemu
cd /qemu

curl --retry 5 -LO https://cdimage.debian.org/cdimage/ports/snapshots/2021-10-20/debian-11.0.0-sparc64-NETINST-1.iso
curl --retry 5 -LO https://cdimage.debian.org/cdimage/ports/snapshots/2022-03-28/debian-11.0.0-sparc64-NETINST-1.iso
7z e debian-11.0.0-sparc64-NETINST-1.iso install/initrd.gz
7z e debian-11.0.0-sparc64-NETINST-1.iso install/vmlinux
mv vmlinux kernel
Expand Down
4 changes: 2 additions & 2 deletions libc-test/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "libc-test"
version = "0.2.133"
version = "0.2.134"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
build = "build.rs"
Expand All @@ -12,7 +12,7 @@ A test crate for the libc crate.

[dependencies.libc]
path = ".."
version = "0.2.133"
version = "0.2.134"
default-features = false

[build-dependencies]
Expand Down

0 comments on commit 05ba49b

Please sign in to comment.