Skip to content

Commit

Permalink
Add build and buildpublish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sclaiborne committed Feb 2, 2024
1 parent d8f55fb commit f6bd746
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This workflow will run build an AS project and publish the libraries to the github package registry

name: Build Libraries

on:
push:
branches-ignore:
- 'main'

jobs:
build-publish-libraries:
runs-on: [AS411, ephemeral]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
path: "main"
lfs: true
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/checkout@v4
with:
repository: "loupeteam/AsGithubAction"
submodules: 'true'
ref: "main"
path: "AsGithubAction"
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/checkout@v4
with:
repository: "loupeteam/ASPython"
submodules: 'true'
ref: "bugfix/pvi-error-code"
path: "AsPython"
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/checkout@v4
with:
repository: "loupeteam/LPM"
submodules: 'true'
ref: "main"
path: "LPM"
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- name: Fix LFS
run: |
cd ./main
git lfs pull
- name: Install AS upgrades
shell: pwsh
run: |
Set-Location -Path ./main/upgrades
& $PWD/install.ps1
- run: python.exe ./AsPython/CmdLineBuild.py ./main/example/AsProject/AsProject.apj -c Intel ARM -bm Rebuild -sim --logLevel DEBUG
- run: python.exe ./AsPython/CmdLineExportLib.py ./main/example/AsProject/AsProject.apj -dest ./libs -c Intel ARM -wl vartools -l DEBUG -o -bm "None"
# - run: python.exe ./ASPython/CmdLineARSim.py ${{ github.workspace }}/main/example/AsProject/AsProject.apj -c Intel --logLevel DEBUG -ss
# - run: python.exe ./ASPython/CmdLineRunUnitTests.py http://127.0.0.1 -a -d ./TestResults
- uses: ./AsGithubAction
with:
token: ${{ secrets.GITHUB_TOKEN }}
# - run: |
# cd ./libs/vartools
# python.exe ${{ github.workspace }}/LPM/src/LPM.py login -s -t ${{ secrets.GHA_PAT_4_25 }} -nc
# python.exe ${{ github.workspace }}/LPM/src/LPM.py init -s -lib -nc
# python.exe ${{ github.workspace }}/LPM/src/LPM.py publish -s -nc
69 changes: 69 additions & 0 deletions .github/workflows/buildPublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow will run build an AS project and publish the libraries to the github package registry

name: Build Libraries

on:
push:
branches:
- main
tags:
- v*


jobs:
build-publish-libraries:
runs-on: [AS411, ephemeral]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
path: "main"
lfs: true
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/checkout@v4
with:
repository: "loupeteam/AsGithubAction"
submodules: 'true'
ref: "main"
path: "AsGithubAction"
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/checkout@v4
with:
repository: "loupeteam/ASPython"
submodules: 'true'
ref: "bugfix/pvi-error-code"
path: "AsPython"
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/checkout@v4
with:
repository: "loupeteam/LPM"
submodules: 'true'
ref: "main"
path: "LPM"
token: ${{ secrets.GHA_PAT_4_25 }} # `GH_PAT` is a secret that contains your PAT
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- name: Fix LFS
run: |
cd ./main
git lfs pull
- name: Install AS upgrades
shell: pwsh
run: |
Set-Location -Path ./main/upgrades
& $PWD/install.ps1
- run: python.exe ./AsPython/CmdLineBuild.py ./main/example/AsProject/AsProject.apj -c Intel ARM -bm Rebuild -sim --logLevel DEBUG
- run: python.exe ./AsPython/CmdLineExportLib.py ./main/example/AsProject/AsProject.apj -dest ./libs -c Intel ARM -wl vartools -l DEBUG -o -bm "None"
- uses: ./AsGithubAction
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
cd ./libs/vartools
python.exe ${{ github.workspace }}/LPM/src/LPM.py login -s -t ${{ secrets.GHA_PAT_4_25 }} -nc
python.exe ${{ github.workspace }}/LPM/src/LPM.py init -s -lib -nc
python.exe ${{ github.workspace }}/LPM/src/LPM.py publish -s -nc

0 comments on commit f6bd746

Please sign in to comment.