Skip to content

Commit

Permalink
Auto merge of #3519 - JohnTitor:tweak-libc-0.2-ci, r=JohnTitor
Browse files Browse the repository at this point in the history
Tweak libc-0.2 CI

- Removes bors-related action
- Listens to the labeled event not to wait for merge queue to be enabled
  • Loading branch information
bors committed Jan 6, 2024
2 parents 11f7c7b + 0b9596b commit 2f93bfb
Showing 1 changed file with 16 additions and 42 deletions.
58 changes: 16 additions & 42 deletions .github/workflows/full_ci.yml
Expand Up @@ -2,13 +2,16 @@ name: full CI

on:
merge_group:
push:
branches: ['main', 'libc-0.2']
pull_request:
branches:
- libc-0.2
types:
- labeled

jobs:
docker_linux_tier1:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: Docker Linux Tier1
Expand All @@ -21,18 +24,15 @@ jobs:
x86_64-unknown-linux-gnu,
]
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run-docker.sh
run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }}

macos:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: macOS
Expand All @@ -44,18 +44,15 @@ jobs:
x86_64-apple-darwin,
]
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run.sh
run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }}

windows:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: Windows
Expand All @@ -77,9 +74,6 @@ jobs:
ARCH: i686
- target: i686-pc-windows-msvc
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Self-update rustup
run: rustup self update
Expand All @@ -92,25 +86,22 @@ jobs:
shell: bash

style_check:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: Style check
runs-on: ubuntu-22.04
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Check style
run: sh ci/style.sh

docker_linux_tier2:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: Docker Linux Tier2
Expand Down Expand Up @@ -150,9 +141,6 @@ jobs:
# x86_64-unknown-redox,
]
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
Expand All @@ -163,7 +151,6 @@ jobs:
# Because of this, only the nightly compiler can be used on these targets.
docker_linux_build_std:
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

if: ${{ false }} # This is currently broken
Expand All @@ -178,9 +165,6 @@ jobs:
armv7-unknown-linux-uclibceabihf
]
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=nightly INSTALL_RUST_SRC=1 sh ./ci/install-rust.sh
Expand All @@ -189,26 +173,23 @@ jobs:

# devkitpro's pacman needs to be connected from Docker.
docker_switch:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: Docker Switch
needs: [docker_linux_tier1, style_check]
runs-on: ubuntu-22.04
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Execute run-docker.sh
run: LIBC_CI=1 sh ./ci/run-docker.sh switch

build_channels_linux:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: Build Channels Linux
Expand All @@ -233,16 +214,14 @@ jobs:
1.30.0,
]
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
- name: Execute build.sh
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh

build_channels_macos:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
contents: read # to fetch code (actions/checkout)

Expand All @@ -268,16 +247,14 @@ jobs:
- { toolchain: 1.30.0, os: macos-11 }
runs-on: ${{ matrix.target.os }}
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh
- name: Execute build.sh
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh

build_channels_windows:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
contents: read # to fetch code (actions/checkout)

Expand Down Expand Up @@ -305,16 +282,13 @@ jobs:
shell: bash

check_cfg:
if: github.event.label.name == 'libc-0.2-pre-merge-ci'
permissions:
actions: write # to cancel workflows (rust-lang/simpleinfra/github-actions/cancel-outdated-builds)
contents: read # to fetch code (actions/checkout)

name: "Check #[cfg]s"
runs-on: ubuntu-22.04
steps:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@HEAD
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
Expand All @@ -325,7 +299,7 @@ jobs:
# protection, rather than having to add each job separately.
success:
name: Success
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [
docker_linux_tier1,
docker_linux_tier2,
Expand Down

0 comments on commit 2f93bfb

Please sign in to comment.