Skip to content

Commit

Permalink
building pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
LetterN committed Mar 4, 2021
1 parent 23c04ca commit dcab40c
Show file tree
Hide file tree
Showing 134 changed files with 10,924 additions and 6,139 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
run_linters:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Run Linters
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup cache
Expand All @@ -21,18 +21,20 @@ jobs:
- name: Install Tools
run: |
pip3 install setuptools
bash tools/ci/install_build_tools.sh
bash tools/ci/install_node.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
pip3 install -r tools/requirements.txt
tools/bootstrap/python -c ''
- name: Run Linters
run: |
bash tools/ci/check_filedirs.sh tgstation.dme
bash tools/ci/check_changelogs.sh
find . -name "*.php" -print0 | xargs -0 -n1 php -l
find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/json_verifier.py
bash tools/ci/build_tgui.sh
tgui/bin/tgui --lint
tgui/bin/tgui --test
bash tools/ci/check_grep.sh
tools/bootstrap/python -m dmi.test
tools/bootstrap/python -m mapmerge2.dmm_test
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
- name: Annotate Lints
uses: yogstation13/DreamAnnotate@v1
Expand All @@ -43,7 +45,7 @@ jobs:
compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Compile Maps
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup cache
Expand All @@ -56,11 +58,13 @@ jobs:
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
python3 tools/ci/template_dm_generator.py
tgui/bin/tgui --build
bash tools/ci/dm.sh -DCIBUILDING -DCITESTING -DALL_MAPS tgstation.dme
run_all_tests:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Integration Tests
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
services:
mysql:
image: mysql:latest
Expand All @@ -87,14 +91,16 @@ jobs:
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install libssl1.1:i386
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
bash tools/ci/install_rust_g.sh
# - name: Compile and run tests
# run: |
# bash tools/ci/install_byond.sh
# source $HOME/BYOND/byond/bin/byondsetup
# bash tools/ci/dm.sh -DCIBUILDING tgstation.dme
# bash tools/ci/run_server.sh
- name: Compile and run tests
run: |
bash tools/ci/install_byond.sh
source $HOME/BYOND/byond/bin/byondsetup
tgui/bin/tgui --build
# bash tools/ci/dm.sh -DCIBUILDING tgstation.dme
# bash tools/ci/run_server.sh
test_windows:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Windows Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: "Check for CHANGELOG_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
publish:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
generate_documentation:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/round_id_linker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
link_rounds:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: Cidatel-Station-13/round_linker@master #notice: fork the round linkies from tg!!
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
update-dmapi:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
name: Update the TGS DMAPI
steps:
- name: Clone
Expand Down
2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)

///Sets the custom materials for an item.
/atom/proc/set_custom_materials(var/list/materials, multiplier = 1)
/atom/proc/set_custom_materials(list/materials, multiplier = 1)
if(custom_materials) //Only runs if custom materials existed at first. Should usually be the case but check anyways
for(var/i in custom_materials)
var/datum/material/custom_material = SSmaterials.GetMaterialRef(i)
Expand Down
2 changes: 1 addition & 1 deletion tgui/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.yarn/**
/**/node_modules
/**/*.bundle.*
/**/*.chunk.*
/**/*.hot-update.*
/packages/inferno/**
/packages/tgui/public/shim-*.js
1 change: 1 addition & 0 deletions tgui/.eslintrc-harder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ rules:
selfClosing: after-props,
nonEmpty: after-props,
}]
react/display-name: error
10 changes: 6 additions & 4 deletions tgui/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parser: babel-eslint
root: true
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2019
ecmaVersion: 2020
sourceType: module
ecmaFeatures:
jsx: true
Expand Down Expand Up @@ -279,7 +280,8 @@ rules:
no-shadow-restricted-names: error
## Disallow the use of undeclared variables unless mentioned
## in /*global*/ comments
no-undef: error
## NOTE: Pointless when TypeScript can check for this
# no-undef: error
## Disallow initializing variables to undefined
no-undef-init: error
## Disallow the use of undefined as an identifier
Expand Down Expand Up @@ -583,7 +585,7 @@ rules:
## Rule enforces consistent usage of destructuring assignment in component
# react/destructuring-assignment: [error, always, { ignoreClassFields: true }]
## Prevent missing displayName in a React component definition
react/display-name: error
# react/display-name: error
## Forbid certain props on Components
# react/forbid-component-props: error
## Forbid certain props on DOM Nodes
Expand Down
3 changes: 2 additions & 1 deletion tgui/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ bin/tgui text eol=lf
## Treat bundles as binary and ignore them during conflicts
*.bundle.* binary merge=tgui-merge-bundle
*.chunk.* binary merge=tgui-merge-bundle
.yarn/releases/* binary
.yarn/releases/**/* binary
.yarn/plugins/**/* binary
9 changes: 4 additions & 5 deletions tgui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ package-lock.json
!/.yarn/plugins
!/.yarn/sdks
!/.yarn/versions
!/.yarn/lock.yml

## Build artifacts
/public/.tmp/**/*
/public/**/*.hot-update.*
/public/**/*.map
/public/**/*
!/public/*.html

## Previously ignored locations that are kept to avoid confusing git
## while transitioning to a new project structure.
/packages/tgui/public/.tmp/**/*
/packages/tgui/public/**/*.hot-update.*
/packages/tgui/public/**/*.map
/packages/tgui/public/**
77 changes: 77 additions & 0 deletions tgui/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions tgui/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

55 changes: 0 additions & 55 deletions tgui/.yarn/releases/yarn-2.3.3.cjs

This file was deleted.

55 changes: 55 additions & 0 deletions tgui/.yarn/releases/yarn-2.4.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tgui/.yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve, dirname} = require(`path`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.js";

Expand Down
2 changes: 1 addition & 1 deletion tgui/.yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "7.4.0-pnpify",
"version": "7.19.0-pnpify",
"main": "./lib/api.js",
"type": "commonjs"
}
20 changes: 20 additions & 0 deletions tgui/.yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.js";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);
20 changes: 20 additions & 0 deletions tgui/.yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.js";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);
6 changes: 6 additions & 0 deletions tgui/.yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "typescript",
"version": "4.1.5-pnpify",
"main": "./lib/typescript.js",
"type": "commonjs"
}
22 changes: 21 additions & 1 deletion tgui/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
yarnPath: .yarn/releases/yarn-2.3.3.cjs
enableScripts: false

logFilters:
## DISABLED_BUILD_SCRIPTS
- code: YN0004
level: discard
## INCOMPATIBLE_OS - fsevents junk
- code: YN0062
level: discard

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

preferAggregateCacheInfo: true

preferInteractive: true

yarnPath: .yarn/releases/yarn-2.4.0.cjs
12 changes: 12 additions & 0 deletions tgui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Run `.\bin\tgui.bat` with any of the options listed below.
doing development on IE8).
- `bin/tgui --lint` - Show problems with the code.
- `bin/tgui --fix` - Auto-fix problems with the code.
- `bin/tgui --test` - Run tests.
- `bin/tgui --analyze` - Run a bundle analyzer.
- `bin/tgui --clean` - Clean up project repo.
- `bin/tgui [webpack options]` - Build the project with custom webpack
Expand Down Expand Up @@ -126,6 +127,17 @@ variable, with a full path to BYOND cache.
BYOND_CACHE="E:/Libraries/Documents/BYOND/cache"
```

**Webpack errors out with some cryptic messages!**

> Example: `No template for dependency: PureExpressionDependency`
Webpack stores its cache on disk since tgui 4.3, and it is very sensitive
to build configuration. So if you update webpack, or share the same cache
directory between development and production build, it will start
hallucinating.

To fix this kind of problem, run `bin/tgui --clean` and try again.

## Developer Tools

When developing with `tgui-dev-server`, you will have access to certain
Expand Down
43 changes: 43 additions & 0 deletions tgui/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/

const createBabelConfig = options => {
const { mode, presets = [], plugins = [] } = options;
return {
presets: [
['@babel/preset-typescript', {
allowDeclareFields: true,
}],
['@babel/preset-env', {
modules: 'commonjs',
useBuiltIns: 'entry',
corejs: '3.8',
spec: false,
loose: true,
targets: [],
}],
...presets,
],
plugins: [
['@babel/plugin-proposal-class-properties', {
loose: true,
}],
'@babel/plugin-transform-jscript',
'babel-plugin-inferno',
'babel-plugin-transform-remove-console',
'common/string.babel-plugin.cjs',
...plugins,
],
};
};

module.exports = api => {
api.cache(true);
const mode = process.env.NODE_ENV;
return createBabelConfig({ mode });
};

module.exports.createBabelConfig = createBabelConfig;
Loading

0 comments on commit dcab40c

Please sign in to comment.