Skip to content

Commit

Permalink
Merge pull request #215 from rust-phf/gha
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jun 13, 2021
2 parents 45e83b9 + 112671e commit 12121ec
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 69 deletions.
61 changes: 0 additions & 61 deletions .circleci/config.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/benches.yml
Expand Up @@ -7,6 +7,10 @@ jobs:
name: Bench
runs-on: ubuntu-latest
steps:
- name: Setup nightly toolchain
run: |
rustup set profile minimal
rustup override set nightly
- uses: actions/checkout@v2
with:
ref: master
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# MSRV and nightly
version: [1.40.0, nightly]
steps:
- uses: actions/checkout@v2

- name: Set toolchain
run: |
rustup set profile minimal
rustup override set ${{ matrix.version }}
- name: Run `cargo test` on workspace
run: cargo test --workspace

- name: phf_macros UI test
if: matrix.version == '1.40.0'
working-directory: phf_macros
run: cargo test --features=unicase_support -- --ignored --test-threads=1

- name: phf_codegen test
run: cargo test -p phf_codegen_test

- name: no_std build check
working-directory: phf
run: cargo build --no-default-features
6 changes: 3 additions & 3 deletions phf_macros/tests/compile-fail-unicase/equivalent-keys.rs
@@ -1,9 +1,9 @@
use unicase::UniCase;
use phf::phf_map;

static MAP: phf::Map<UniCase<&'static str>, isize> = phf_map!( //~ ERROR duplicate key UniCase("FOO")
UniCase::ascii("FOO") => 42, //~ NOTE one occurrence here
UniCase::ascii("foo") => 42, //~ NOTE one occurrence here
static MAP: phf::Map<UniCase<&'static str>, isize> = phf_map!(
UniCase::ascii("FOO") => 42,
UniCase::ascii("foo") => 42, //~ ERROR duplicate key UniCase("FOO")
);

fn main() {}
4 changes: 1 addition & 3 deletions phf_macros/tests/compile-fail-unicase/equivalent-keys.stderr
@@ -1,7 +1,5 @@
error: duplicate key
--> $DIR/equivalent-keys.rs:6:5
|
6 | UniCase::ascii("foo") => 42, //~ NOTE one occurrence here
6 | UniCase::ascii("foo") => 42, //~ ERROR duplicate key UniCase("FOO")
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 0 additions & 2 deletions phf_macros/tests/compile-fail/bad-syntax.stderr
Expand Up @@ -3,5 +3,3 @@ error: expected identifier
|
5 | => //~ ERROR expected identifier
| ^^
|
= note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info)

0 comments on commit 12121ec

Please sign in to comment.