Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package #54

Merged
merged 14 commits into from
Oct 3, 2024
24 changes: 18 additions & 6 deletions .github/actions/build-linux/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This action to checkout like this before invoking it
# - name: Checkout repository under ./libMvrGdtf
# uses: actions/checkout@v4
# with:
# path: libMvrGdtf

name: 'Build Linux'
description: 'Build ths packages for Linux package'
runs:
Expand All @@ -24,15 +30,10 @@ runs:
shell: bash
working-directory: xerces-c
run: |
./configure --disable-shared --enable-xmlch-uint16_t --prefix=$(pwd)/_build
./configure --disable-shared --enable-xmlch-uint16_t --prefix=$(pwd)/_build CFLAGS="-fPIC" CXXFLAGS="-fPIC"
make -j
make install

- name: libMVRGdtf - checkout repository
uses: actions/checkout@v4
with:
path: libMvrGdtf

- name: libMVRGdtf - build
shell: bash
working-directory: libMvrGdtf
Expand All @@ -41,3 +42,14 @@ runs:
cd build
cmake .. -DUNITTEST=TRUE -DEXTRA_LIBS="curl;icuuc;icudata;icui18n;icuio" -DXERCES_LIB_PATH="$(pwd)/../../xerces-c/_build/lib/libxerces-c.a"
make -j

- name: Prepare package
shell: bash
working-directory: libMvrGdtf
run: |
mkdir -p output/include
cp -r src/Include/* output/include/

mkdir -p output/lib
cp ../xerces-c/_build/lib/libxerces-c.a ./libs/libxerces-c.a
cp -r libs/* output/lib/
17 changes: 6 additions & 11 deletions .github/workflows/build-linux-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ jobs:
runs-on: ubuntu-latest
name: Export a Linux build as an artifact
steps:
- uses: actions/checkout@v4 # https://github.com/nektos/act/issues/307
- name: Build
uses: ./.github/actions/build-linux
- name: libMVRGdtf - checkout repository
uses: actions/checkout@v4
with:
path: libMvrGdtf

- name: Prepare Artifact
working-directory: libMvrGdtf
run: |
mkdir -p output/include
cp -r src/Include/* output/include/

mkdir -p output/lib
cp -r libs/* output/lib/
- name: Build
uses: ./libMvrGdtf/.github/actions/build-linux

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ jobs:
runs-on: macos-latest

steps:
# Do we need this?
- name: Checkout repository
uses: actions/checkout@v2

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/linux-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/nektos/act/issues/307
- name: libMVRGdtf - checkout repository
uses: actions/checkout@v4
with:
path: libMvrGdtf

- name: Build
uses: ./.github/actions/build-linux
uses: ./libMvrGdtf/.github/actions/build-linux

- name: Testing...
working-directory: libMvrGdtf/build
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Name of our action
name: Release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository under ./libMvrGdtf
uses: actions/checkout@v4
with:
path: libMvrGdtf
fetch-depth: 0
fetch-tags: true

- name: Build
uses: ./libMvrGdtf/.github/actions/build-linux

- name: Add .npmrc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PKG_KEY}}
run: |
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
echo "@mvrdevelopment:registry=https://npm.pkg.github.com/" >> ~/.npmrc

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.NPM_PKG_KEY }}
NODE_AUTH_TOKEN: ${{secrets.NPM_PKG_KEY}}
working-directory: libMvrGdtf
run: |
npm install
npm run release
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ libVectorworksMvrGdtf\.vcx/libs
build_v7a/

build_v8a/

node_modules
output
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package-lock=false
@mvrdevelopment:registry=https://npm.pkg.github.com
Loading