Skip to content

Commit

Permalink
Various fixes to make CI green again (#4464)
Browse files Browse the repository at this point in the history
Summary:
- Added `babel-plugin-syntax-hermes-parser` to jest config to support new flow syntax
- Use `NO_COLOR` env variable to disable color printing in rust unit test after migration to tokio:test
- Backout `Build Compiler Explorer` #3928 - this is currently failing with error:
```
Instruction does not dominate all uses!
  %143 = getelementptr inbounds %47, ptr %76, i32 0, i32 1, i32 1
  %137 = getelementptr inbounds %13, ptr %143, i32 0, i32 1
in function _ZN102_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4fold17h3684d0946383414eE
LLVM ERROR: Broken function found, compilation aborted!
error: could not compile `schema` (lib)
warning: build failed, waiting for other jobs to finish...
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "/Users/alunyov/relay/compiler/crates/relay-compiler-playground" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
```
Need more time to investigate and fix it, but we want to unblock CI issues before the next release.

Pull Request resolved: #4464

Reviewed By: captbaritone

Differential Revision: D49962335

Pulled By: alunyov

fbshipit-source-id: cfaf54e3d114fda49054583e73d2d12f10d89dc5
  • Loading branch information
alunyov authored and facebook-github-bot committed Oct 5, 2023
1 parent 84ac173 commit 6911daa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 36 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/docusaurus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,17 @@ on:
- main

jobs:
build-compiler-explorer:
name: Build Compiler Explorer
runs-on: macos-latest # wasm-pack not working on Ubuntu https://github.com/rustwasm/wasm-pack/issues/781
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.58.0
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: "Build Compiler Playground Wasm NPM package"
run: wasm-pack build --target web
working-directory: ./compiler/crates/relay-compiler-playground
- uses: actions/upload-artifact@v3
with:
name: compiler-playground-package
path: compiler/crates/relay-compiler-playground/pkg/

build-and-deploy:
runs-on: ubuntu-latest
needs: [build-compiler-explorer]
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false

- name: Download Compiler Explorer
uses: actions/download-artifact@v2
with:
name: compiler-playground-package
path: tmp/compiler-playground-package

- name: Link Compiler Explorer
run: yarn link
working-directory: tmp/compiler-playground-package

- name: Install and Build
run: |
yarn
yarn link relay-compiler-playground
yarn build
working-directory: website/

Expand Down
2 changes: 1 addition & 1 deletion compiler/Cargo.lock

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

3 changes: 1 addition & 2 deletions compiler/crates/fixture-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ pub async fn test_fixture<T, U, V>(
let actual_result: Result<U, V>;
{
let _guard = LOCK.lock();
colored::control::set_override(false);
env::set_var("NO_COLOR", "1");
actual_result = transform(&fixture).await;
colored::control::unset_override();
}

let actual = match &actual_result {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import type {
} from './__generated__/loadQueryStoreBehaviorTestQuery.graphql';
import type {GraphQLSingularResponse} from 'relay-runtime/network/RelayNetworkTypes';
import type {Sink} from 'relay-runtime/network/RelayObservable';
import type {OperationType, Query} from 'relay-runtime/util/RelayRuntimeTypes';
import type {Query} from 'relay-runtime/util/RelayRuntimeTypes';

const {loadQuery} = require('../loadQuery');
const {
Expand Down
3 changes: 2 additions & 1 deletion scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const path = require('path');

const babelOptions = getBabelOptions({
env: 'test',
// Tests use a Promise polfill so they can use jest.runAllTimers().
// Tests use a Promise polyfill so they can use jest.runAllTimers().
autoImport: true,
plugins: [
'./dist/babel-plugin-relay',
Expand All @@ -28,6 +28,7 @@ const babelOptions = getBabelOptions({
'@babel/plugin-proposal-optional-catch-binding',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-async-to-generator',
'babel-plugin-syntax-hermes-parser',
],
});

Expand Down

0 comments on commit 6911daa

Please sign in to comment.