Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PTKu committed Jan 24, 2023
0 parents commit 7f1ee2a
Show file tree
Hide file tree
Showing 2,966 changed files with 173,852 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 1,
"isRoot": true,
"tools": {
"xmldocmd": {
"version": "2.9.0",
"commands": [
"xmldocmd"
]
},
"docfx": {
"version": "2.60.0",
"commands": [
"docfx"
]
}
}
}
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug, question
assignees: ix-ax

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Microsoft Windows [Version 10.0.18363.1082]]
- ix version
- simatix-ax version [eg. 4024.10]
- other tools used (visual studio, vscode)

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[NEW-FEATURE]"
labels: feature-request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Question
about: Ask question
title: "[QUESTION]"
labels: question
assignees: ix-ax

---

# State topic of your question

(Can I do this or that? What if I would like to...)
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Suggestion
about: Suggest an idea for this project
title: "[IDEA]"
labels: ''
assignees: ''

---

**Is your suggestion related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
40 changes: 40 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Third party dependency update
- [ ] Third party dependency addition

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* simatix-ax version:
* ix version:
* Hardware PLC:
* Other hardware:

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
26 changes: 26 additions & 0 deletions .github/actions/apax-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Building an apax library or application"
description: "Builds the package and returns it as an artifact"
inputs:
APAX_TOKEN:
required: true
description: "The access token is used to log into the apax registry in order to retrieve apax npm package"

runs:
using: "composite"
steps:
- name: Show contents of folder
shell: bash
run: |
pwd
ls -a
- name: Login to apax repository
run: apax login --password ${{ inputs.APAX_TOKEN }}
shell: bash

- name: Install apax dependencies
run: apax install --update-lockfile
shell: bash

- name: Build apax package
shell: bash
run: apax build
56 changes: 56 additions & 0 deletions .github/actions/setup-apax-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "Setup the apax environment"
description: "Installs apax and needed software on the runner in order to test, build, pack and release apax packages"
inputs:
APAX_TOKEN:
required: true
description: "The access token is used to log into the apax registry in order to retrieve apax npm package"

runs:
using: "composite"
steps:
- shell: bash
run: |
echo "No cache hit, setup from scratch"
- name: install_apax
shell: bash
env:
APAX_TOKEN: ${{ inputs.APAX_TOKEN }}
SCRIPT_PATH: actions
run: |
sudo curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
sudo apt-get install --assume-yes --no-install-recommends \
libtinfo5 \
git
npm -v
node -v
sudo mkdir apax-dep
sudo npm config set prefix "~/.local/"
sudo mkdir -p ~/.local/bin
sudo echo 'export PATH=~/.local/bin/:$PATH' >>~/.bashrc
sudo npm init -y
sudo curl -H "Authorization: bearer $APAX_TOKEN" "https://api.simatic-ax.siemens.io/apax/login?format=npmrc" -o .npmrc --verbose
sudo npm add @ax/apax-signed
sudo npm install
cd node_modules/@ax/apax-signed
ls -a
echo "-----BEGIN PUBLIC KEY-----" \
>public.pem
sudo echo "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4m2LqXil8zyn+Z9v0J93" \
>>public.pem
echo "03hNjjrw6JMKvj0skNJvSaNPq1cYwq1Q/cu86Ny/Wl+lJT+Nzl32oKcgPuU+eY1Z" \
>>public.pem
echo "VTm9ZYPmIuoO+WPEsW5v1q8u7LURJt5jMxyfVQLXakUzkrjdQY+8/fO77R/s7ndi" \
>>public.pem
echo "qOXvoDw4SC8RAcbFVoske7R9L8nr8+lAjyOAs7fcWEOAkXaFF3BNIddxAGtAjXr5" \
>>public.pem
echo "5y+ecHh0wom+diN3RdSDk5TqKl9F8lThAqd8LjFxRcjaeaKftruTB9yd+ppN/4wl" \
>>public.pem
echo "avwaTQ/7eYHbvNV5aYeELUzxFykhsqKlIeo93y/ncnU0xS7W6ccCvNJ74kRfRtJY" \
>>public.pem
echo "WwIDAQAB" \
>>public.pem
echo "-----END PUBLIC KEY-----" \
>>public.pem
sudo openssl dgst -sha256 -verify public.pem -signature ax-apax.sig ax-apax-*.tgz
npm install --global ax-apax-*.tgz --verbose
apax --version
53 changes: 53 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: dev

on:
push:
branches: [ "dev" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
pull_request:
branches: [ "dev" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
workflow_dispatch:

jobs:
build:
strategy:
matrix:
configuration: [Release]

runs-on: [ubuntu-latest] # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: "Setup the apax in the ci runner"
#uses: simatic-ax/actions/setup-apax-runner@main
uses: ./.github/actions/setup-apax-runner
with:
APAX_TOKEN: ${{ secrets.APAX_TOKEN }}

- name: "Get github nuget source"
#uses: simatic-ax/actions/setup-apax-runner@main
run: sudo dotnet nuget add source --username ix-ax --password ${{ secrets.GH_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ix-ax/index.json"

- name: "login to apax"
run: sudo apax login -p ${{ secrets.APAX_TOKEN }}
shell: bash

- name: "Build script"
run: sudo dotnet build cake/Build.csproj
shell: bash

- name: "Run build script"
run: sudo dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 1
shell: bash

37 changes: 37 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: master

on:
push:
branches: [ "master" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
pull_request:
branches: [ "master" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
workflow_dispatch:

jobs:
build:
strategy:
matrix:
configuration: [Release]

runs-on: [self-hosted] # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: "Build script"
run: dotnet build cake/Build.csproj

- name: "Run build script"
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true

37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

on:
push:
branches: [ "releases/*" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
pull_request:
branches: [ "releases/*" ]
paths:
- 'src/**'
- 'cake/**'
- '.github/**'
workflow_dispatch:

jobs:
build:
strategy:
matrix:
configuration: [Release]

runs-on: [self-hosted] # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: "Build script"
run: dotnet build cake/Build.csproj

- name: "Run build script"
run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 100 --do-publish true

Loading

0 comments on commit 7f1ee2a

Please sign in to comment.