diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 7e5125f3649..00000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - java: - name: Java ${{ matrix.platform }} ${{ matrix.java }} - runs-on: ${{ matrix.platform }} - continue-on-error: ${{ matrix.experimental }} - strategy: - fail-fast: false - matrix: - java: ['11', '17'] - platform: [ubuntu-latest] - mvn_opts: ['-Dsurefire.useFile=false'] - experimental: [false] - include: - - platform: macos-latest - java: '11' - mvn_opts: '-Dsurefire.useFile=false' - experimental: true - - platform: windows-latest - java: '11' - mvn_opts: '"-Dsurefire.useFile=false"' - experimental: true - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: ${{ matrix.java }} - - name: Run test suite - run: mvn -B --no-transfer-progress ${{ matrix.mvn_opts }} test - - uses: actions/upload-artifact@v3.1.2 - if: failure() - with: - name: errdump - path: | - yamcs-core/hs_err* - yamcs-core/target/surefire-reports/*.dump* - tests/hs_err* - tests/target/surefire-reports/*.dump* - - javadoc: - name: Javadoc ${{ matrix.java }} - runs-on: ubuntu-latest - strategy: - matrix: - java: ['11', '17'] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: ${{ matrix.java }} - - name: Generate javadoc - run: mvn -B --no-transfer-progress -DskipTests javadoc:aggregate - - web: - name: Web - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Set up webapp - run: cd yamcs-web/src/main/webapp; npm install - - name: Build webapp - run: cd yamcs-web/src/main/webapp; npm run build - - docs: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - - name: Generate protobin - run: mvn -B --no-transfer-progress -DskipTests compile - - uses: actions/setup-python@v3 - with: - python-version: 3.7 - - name: Set up sphinx - run: | - cd docs - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Generate HTTP API documentation - run: | - cd docs/http-api - make html - - name: Generate Server Manual - run: | - cd docs/server-manual - make man html diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 00000000000..580c0e9741c --- /dev/null +++ b/.github/workflows/maven-publish.yml @@ -0,0 +1,42 @@ +name: Create package on push to master + +on: + push: + branches: [ CI_CD_Dev ] + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/Hydrogen' + + # Do npm install and build steps for YAMCS webapp. + - name: Install dependencies and build frontend + run: | + echo ${{ github.workspace }} + cd ${{ github.workspace }}/yamcs-web/src/main/webapp + npm install + npm run build + + - name: Set up Java 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn clean install -DskipTests + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -DskipTests -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/pom.xml b/pom.xml index 9f027416537..4ed4a487c83 100644 --- a/pom.xml +++ b/pom.xml @@ -382,13 +382,10 @@ - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + github + GitHub PixxelHQ Apache Maven Packages + https://maven.pkg.github.com/pixxelhq/yamcs