diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..365dbaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* -text +*.exe filter=lfs diff=lfs merge=lfs -text diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9bda386 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +# This workflow will run build an AS project and publish the libraries to the github package registry + +name: Build Libraries + +on: + workflow_dispatch: + push: + branches-ignore: + - 'main' + +jobs: + build-libraries: + runs-on: [AS411] + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + path: "main" + lfs: true + - name: Fix LFS + run: | + cd ./main + git lfs pull + - name: Install AS upgrades + run: python.exe C:/Tools/AsPython/InstallUpgrades.py ${{ github.workspace }}/main/upgrades -asp AS411 -r --logLevel DEBUG + - name: Build project + run: python.exe C:/Tools/AsPython/CmdLineBuild.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -c Intel ARM -bm Rebuild -sim --logLevel DEBUG + - name: Export libraries + run: python.exe C:/Tools/AsPython/CmdLineExportLib.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -dest ./libs -c Intel ARM -wl vartools -l DEBUG -o -bm "None" \ No newline at end of file diff --git a/.github/workflows/buildPublish.yml b/.github/workflows/buildPublish.yml new file mode 100644 index 0000000..aec954e --- /dev/null +++ b/.github/workflows/buildPublish.yml @@ -0,0 +1,40 @@ +# This workflow will run build an AS project and publish the libraries to the github package registry + +name: Build Publish Libraries + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - v* + +jobs: + build-publish-libraries: + runs-on: [AS411] + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + path: "main" + lfs: true + - name: Fix LFS + run: | + cd ./main + git lfs pull + - name: Install AS upgrades + run: python.exe C:/Tools/AsPython/InstallUpgrades.py ${{ github.workspace }}/main/upgrades -asp AS411 -r --logLevel DEBUG + - name: Build project + run: python.exe C:/Tools/AsPython/CmdLineBuild.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -c Intel ARM -bm Rebuild -sim --logLevel DEBUG + - name: Export libraries + run: python.exe C:/Tools/AsPython/CmdLineExportLib.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -dest ./libs -c Intel ARM -wl vartools -l DEBUG -o -bm "None" + - name: Publish libraries + run: | + cd ./libs/vartools + python.exe C:/Tools/LPM/src/LPM.py login -s -t ${{ secrets.GITHUB_TOKEN }} -nc + python.exe C:/Tools/LPM/src/LPM.py init -s -lib -nc + python.exe C:/Tools/LPM/src/LPM.py publish -s -nc \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index c2375a0..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,11 +0,0 @@ - -library "jenkinsLibrary@develop" - -buildPublishPipeline( - slackChannel: "sandbox-github", - asProjectRepo: "vartools", - asProjectVersion: "main", - asProjectPath: "example/AsProject", - skipLpmInstall: true, - packagesToPublish: ['src/Ar/vartools'] -) diff --git a/example/AsProject/AsProject.apj b/example/AsProject/AsProject.apj index 37df849..d7f7cfc 100644 --- a/example/AsProject/AsProject.apj +++ b/example/AsProject/AsProject.apj @@ -1,5 +1,5 @@ - - + + diff --git a/example/AsProject/Logical/Programs/Default/Main.c b/example/AsProject/Logical/Programs/Default/Main.c index 86fb279..a413ed8 100644 --- a/example/AsProject/Logical/Programs/Default/Main.c +++ b/example/AsProject/Logical/Programs/Default/Main.c @@ -1,22 +1,22 @@ - -#include - -#ifdef _DEFAULT_INCLUDES - #include -#endif - -void _INIT ProgramInit(void) -{ - -} - -void _CYCLIC ProgramCyclic(void) -{ - -} - -void _EXIT ProgramExit(void) -{ - -} - + +#include + +#ifdef _DEFAULT_INCLUDES + #include +#endif + +void _INIT ProgramInit(void) +{ + +} + +void _CYCLIC ProgramCyclic(void) +{ + varGetValue(&var); +} + +void _EXIT ProgramExit(void) +{ + +} + diff --git a/example/AsProject/Logical/Programs/Default/Variables.var b/example/AsProject/Logical/Programs/Default/Variables.var index 3e8a206..c4cf13a 100644 --- a/example/AsProject/Logical/Programs/Default/Variables.var +++ b/example/AsProject/Logical/Programs/Default/Variables.var @@ -1,8 +1,3 @@ - -VAR - -END_VAR - -VAR CONSTANT - -END_VAR +VAR + var : varVariable_typ; +END_VAR diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg b/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg index bb60475..95084a3 100644 --- a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg +++ b/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg @@ -1,4 +1,4 @@ - + diff --git a/example/AsProject/Physical/Intel/Hardware.hw b/example/AsProject/Physical/Intel/Hardware.hw index 9033c09..8d15153 100644 --- a/example/AsProject/Physical/Intel/Hardware.hw +++ b/example/AsProject/Physical/Intel/Hardware.hw @@ -1,4 +1,4 @@ - + diff --git a/upgrades/5AC901.IPLK-00/1.7.1.0/AS4_HW_5AC901.IPLK-00.exe b/upgrades/5AC901.IPLK-00/1.7.1.0/AS4_HW_5AC901.IPLK-00.exe new file mode 100644 index 0000000..1c1df91 --- /dev/null +++ b/upgrades/5AC901.IPLK-00/1.7.1.0/AS4_HW_5AC901.IPLK-00.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be89779ab99e31b1c9b241c947abda3c927f174be6cac6b65cf5f9c0b0804dd0 +size 510488 diff --git a/upgrades/5PC900.TS17-04/2.1.0.0/AS4_HW_5PC900.TS17-04.exe b/upgrades/5PC900.TS17-04/2.1.0.0/AS4_HW_5PC900.TS17-04.exe new file mode 100644 index 0000000..7fd6a88 --- /dev/null +++ b/upgrades/5PC900.TS17-04/2.1.0.0/AS4_HW_5PC900.TS17-04.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adce7c09f78cff9fa0ec5ddb7a8b5862e126c71f4bb5118b24403cd8100a6880 +size 257528 diff --git a/upgrades/AS4_AR_B0491_X20CP04xx.exe b/upgrades/AS4_AR_B0491_X20CP04xx.exe new file mode 100644 index 0000000..cf5b287 --- /dev/null +++ b/upgrades/AS4_AR_B0491_X20CP04xx.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a8cf2db457a99985a63ac6c089282f00a0bdce680a0e00a465fffcf3920c77f +size 15886792 diff --git a/upgrades/AS4_AR_C0490_APC9xxS.exe b/upgrades/AS4_AR_C0490_APC9xxS.exe new file mode 100644 index 0000000..b5565bf --- /dev/null +++ b/upgrades/AS4_AR_C0490_APC9xxS.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07d8831edb2249b2f2fd2b4627e73494a8123d79b461d765820f190c8eeeffa8 +size 96422840 diff --git a/upgrades/install.ps1 b/upgrades/install.ps1 new file mode 100644 index 0000000..4b8f9e3 --- /dev/null +++ b/upgrades/install.ps1 @@ -0,0 +1,11 @@ +# set environment variables +$env:AS_VERSION_SHORT = 'AS411' +Get-ChildItem "$PWD" -Recurse -Filter *.exe | Foreach-Object { + Write-Output "installing $($_.Name)"; + Write-Verbose "Into C:\BrAutomation\$env:AS_VERSION_SHORT"; + & $_.FullName -G='C:\BrAutomation' -V="C:\BrAutomation\$env:AS_VERSION_SHORT" -R | Out-Null; + if($LASTEXITCODE -ne 0) { + Write-Error "Error installing $($_.Name). Exit code $LASTEXITCODE"; + exit 1; + } +} \ No newline at end of file