2020-07-31 12:49:07 +03:00
|
|
|
name: Compilation
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
#on:
|
|
|
|
# push:
|
|
|
|
# # Ignore commits created by bors
|
|
|
|
# branches-ignore:
|
|
|
|
# - 'staging'
|
|
|
|
# - 'trying'
|
|
|
|
# pull_request:
|
|
|
|
# branches-ignore:
|
|
|
|
# - 'staging'
|
|
|
|
# - 'trying'
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
CI: "1"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
2020-08-03 19:33:23 +03:00
|
|
|
name: compilation
|
2020-07-31 12:49:07 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-03-25 19:22:09 +03:00
|
|
|
# We explicitly do this to cache properly.
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
|
2020-08-03 19:33:23 +03:00
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/
|
2021-12-12 16:52:58 +03:00
|
|
|
key: ${{ runner.os }}-cargo-compiliation
|
2020-08-03 19:33:23 +03:00
|
|
|
|
|
|
|
- name: Install cargo hack
|
2020-07-31 12:49:07 +03:00
|
|
|
run: |
|
2021-12-12 16:52:58 +03:00
|
|
|
cargo install cargo-hack --version 0.5.7
|
2020-07-31 12:49:07 +03:00
|
|
|
|
|
|
|
- name: Check swc_common
|
|
|
|
run: |
|
2021-11-10 10:39:01 +03:00
|
|
|
(cd crates/swc_common && cargo hack check --feature-powerset --no-dev-deps)
|
2020-08-03 19:33:23 +03:00
|
|
|
|
2021-01-25 05:32:09 +03:00
|
|
|
- name: Check swc_ecma_ast
|
|
|
|
run: |
|
2021-11-10 13:00:54 +03:00
|
|
|
(cd crates/swc_ecma_ast && cargo hack check --feature-powerset --no-dev-deps)
|
2021-01-25 05:32:09 +03:00
|
|
|
|
2021-11-12 17:33:32 +03:00
|
|
|
- name: Check swc_ecma_loader
|
|
|
|
run: |
|
|
|
|
(cd crates/swc_ecma_loader && cargo hack check --feature-powerset --no-dev-deps)
|
|
|
|
|
2020-08-03 19:33:23 +03:00
|
|
|
- name: Check swc_ecma_transforms
|
|
|
|
run: |
|
2021-11-10 13:00:54 +03:00
|
|
|
(cd crates/swc_ecma_transforms && cargo hack check --feature-powerset --no-dev-deps)
|
2020-08-12 16:18:47 +03:00
|
|
|
|
2021-10-17 18:03:30 +03:00
|
|
|
- name: Check swc_ecma_transforms_base
|
|
|
|
run: |
|
2021-11-10 13:00:54 +03:00
|
|
|
(cd crates/swc_ecma_transforms_base && cargo hack check --feature-powerset --no-dev-deps)
|
2021-10-17 18:03:30 +03:00
|
|
|
|
2021-10-16 11:12:02 +03:00
|
|
|
- name: Check swc_ecma_transforms_compat
|
|
|
|
run: |
|
2021-11-10 13:00:54 +03:00
|
|
|
(cd crates/swc_ecma_transforms_compat && cargo hack check --feature-powerset --no-dev-deps)
|
2021-10-16 11:12:02 +03:00
|
|
|
|
2021-10-09 11:08:13 +03:00
|
|
|
- name: Check swc_ecma_transforms_optimization
|
|
|
|
run: |
|
2021-11-10 13:00:54 +03:00
|
|
|
(cd crates/swc_ecma_transforms_optimization && cargo hack check --feature-powerset --no-dev-deps)
|
2021-10-09 11:08:13 +03:00
|
|
|
|
|
|
|
- name: Check swc_ecma_utils
|
|
|
|
run: |
|
2021-11-10 13:00:54 +03:00
|
|
|
(cd crates/swc_ecma_utils && cargo hack check --feature-powerset --no-dev-deps)
|
2021-10-09 11:08:13 +03:00
|
|
|
|
2020-08-12 16:18:47 +03:00
|
|
|
- name: Check swc_bundler
|
|
|
|
run: |
|
2021-11-09 14:42:49 +03:00
|
|
|
(cd crates/swc_bundler && cargo hack check --feature-powerset --no-dev-deps)
|
2021-10-16 11:12:02 +03:00
|
|
|
|
2021-12-12 16:52:58 +03:00
|
|
|
- name: Check node_swc
|
|
|
|
run: |
|
|
|
|
(cd crates/node && cargo check)
|
|
|
|
(cd crates/node && cargo check --no-default-features --features swc_v2)
|
|
|
|
|
|
|
|
- name: Check swc_node_bundler
|
|
|
|
run: |
|
|
|
|
(cd crates/swc_node_bundler && cargo check)
|
|
|
|
(cd crates/swc_node_bundler && cargo check --no-default-features --features swc_v2)
|
|
|
|
|
2021-10-16 11:12:02 +03:00
|
|
|
- name: Check swc
|
|
|
|
run: |
|
2021-11-09 14:42:49 +03:00
|
|
|
(cd crates/swc && cargo hack check --feature-powerset --no-dev-deps)
|