Skip to content

Commit

Permalink
Update LLVM to 13 (#538)
Browse files Browse the repository at this point in the history
* Update dependencies

* Fix warnings

* Fix build

* Fix script

* Bump version

* TEST

* Revert "TEST"

This reverts commit 51f89c7.

* Use clang

* Remove targets from top-level rust-toolchain.toml

* Revert "Use clang"

This reverts commit 07a1159.

* Install gcc

* Revert "Install gcc"

This reverts commit 2e64f53.

* Install gcc

* Try using Ubuntu 18.04

* Revert "Install gcc"

This reverts commit 83302d5.

* Use Ubuntu 18.04 more

* Clean homebrew cache after setup

* Revert "Clean homebrew cache after setup"

This reverts commit 0e3445e.

* Revert "Remove targets from top-level rust-toolchain.toml"

This reverts commit b52d2b9.
  • Loading branch information
raviqqe authored Nov 19, 2021
1 parent d5e0efd commit e24562a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["-A", "improper_ctypes", "-D", "improper_ctypes_definitions"]
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
jobs:
tag_check:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
outputs:
version: ${{ env.version }}
should_release: ${{ env.should_release }}
Expand All @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-18.04
- macos-latest
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -40,7 +40,7 @@ jobs:
needs:
- tag_check
- build_asset
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -63,7 +63,7 @@ jobs:
- tag_check
- release
if: needs.tag_check.outputs.should_release == 'true'
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: tools/ci/set_up_os.sh
- run: cargo build --locked
- run: git diff --exit-code
unit_test:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: tools/ci/set_up_os.sh
Expand All @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-18.04
- macos-latest
runs-on: ${{ matrix.os }}
steps:
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/src/guides/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can also build Pen from source on your local machine.
1. Install the following software using a package manager of your choice (e.g. `apt` for Ubuntu and [Homebrew][homebrew] for macOS.)

- [Rust](https://www.rust-lang.org/)
- [LLVM 12](https://llvm.org/)
- [LLVM 13](https://llvm.org/)
- [Git](https://git-scm.com/)
- [Ninja](https://ninja-build.org/)

Expand Down
2 changes: 1 addition & 1 deletion lib/infra/src/llvm_command_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::command_finder;
use std::{error::Error, path::PathBuf};

const MINIMUM_VERSION: usize = 11;
const MAXIMUM_VERSION: usize = 12;
const MAXIMUM_VERSION: usize = 13;

pub fn find(command: &str) -> Result<PathBuf, Box<dyn Error>> {
for version in (MINIMUM_VERSION..=MAXIMUM_VERSION).rev() {
Expand Down
8 changes: 5 additions & 3 deletions tools/ci/set_up_os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -e

brew install jq llvm@12 ninja
llvm_version=13

llvm_prefix=$(brew --prefix)/opt/llvm@12
brew install jq llvm@$llvm_version ninja

echo LLVM_SYS_120_PREFIX=$llvm_prefix >>$GITHUB_ENV
llvm_prefix=$(brew --prefix)/opt/llvm@$llvm_version

echo LLVM_SYS_${llvm_version}0_PREFIX=$llvm_prefix >>$GITHUB_ENV
echo PATH=$llvm_prefix/bin:$PATH >>$GITHUB_ENV

if [ $RUNNER_OS = Linux ]; then
Expand Down
2 changes: 0 additions & 2 deletions tools/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ install_nightly_component clippy

$(dirname $0)/run_all_crates.sh \
rustup run nightly cargo clippy $options -Z unstable-options -- \
-A improper_ctypes \
-D improper_ctypes_definitions \
-D clippy::use_self \
-D clippy::mod_module_files \
"$@"

0 comments on commit e24562a

Please sign in to comment.