github actions test port typo #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MiniPlex Workflow | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+*' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build-job: | |
name: ${{matrix.os}} ${{matrix.build-type}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
build-type: [Release,Debug] | |
runs-on: ${{ matrix.os }} | |
env: | |
BUILD_TYPE: ${{ matrix.build-type }} | |
JOB_NAME: ${{matrix.os}}_${{matrix.build-type}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 8 | |
- if: always() | |
name: Upload Exes | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MiniPlex_${{env.JOB_NAME}}_exe | |
retention-days: 7 | |
path: | | |
${{github.workspace}}/build/MiniPlex | |
${{github.workspace}}/build/**/MiniPlex.exe | |
${{github.workspace}}/build/**/MiniPlex.pdb | |
${{github.workspace}}/build/ProtoConv | |
${{github.workspace}}/build/**/ProtoConv.exe | |
${{github.workspace}}/build/**/ProtoConv.pdb | |
LICENSE | |
NOTICE | |
README.md | |
RELEASE_NOTES | |
3rdPartyLicenses/LICENSE_1_0.txt | |
- if: ${{ always() && !contains(matrix.os,'windows') }} | |
name: Start MiniPlex | |
shell: bash | |
run: | | |
${{github.workspace}}/build/MiniPlex -H -p 20000 & | |
${{github.workspace}}/build/MiniPlex -T -p 20001 -r 127.0.0.1 -t 50000 & | |
${{github.workspace}}/build/MiniPlex -P -p 20002 -r 127.0.0.1 -t 50000 & | |
${{github.workspace}}/build/MiniPlex -P -p 20003 -r 127.0.0.1 -t 50000 -B 127.0.0.1 -b 50001 & | |
sleep 1 | |
- if: always() && contains(matrix.os,'macos') | |
name: Mac ncat | |
run: | | |
brew install nmap | |
- if: always() && contains(matrix.os,'ubuntu') | |
name: Linux ncat | |
run: | | |
sudo apt-get install -y ncat | |
- if: ${{ always() && !contains(matrix.os,'windows') }} | |
name: Test Hub Mode | |
run: | | |
Test/HubMode.sh 127.0.0.1 20000 | |
- if: ${{ always() && !contains(matrix.os,'windows') }} | |
name: Test Trunk Mode | |
run: | | |
Test/TrunkMode.sh 50000 127.0.0.1 20001 | |
- if: ${{ always() && !contains(matrix.os,'windows') }} | |
name: Test Prune Mode | |
run: | | |
Test/PruneMode.sh 50000 127.0.0.1 20002 | |
- if: ${{ always() && !contains(matrix.os,'windows') }} | |
name: Test Permanent Branches | |
run: | | |
Test/PermanentBranches.sh 50000 50001 127.0.0.1 20003 | |
- if: ${{ always() && !contains(matrix.os,'windows') }} | |
name: Stop MiniPlex | |
run: | | |
killall MiniPlex || true | |
musl-build-job: | |
name: linux-static ${{matrix.build-type}} | |
strategy: | |
fail-fast: false | |
matrix: | |
build-type: [Release,Debug] | |
runs-on: ubuntu-latest | |
env: | |
BUILD_TYPE: ${{ matrix.build-type }} | |
JOB_NAME: linux-static_${{matrix.build-type}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- if: matrix.build-type == 'Debug' | |
name: Set Debug Options | |
run: | | |
echo 'STRIP_OPTION=-V' >> $GITHUB_ENV | |
- name: Docker Build | |
run: | | |
docker build \ | |
--build-arg BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
--build-arg STRIP_OPTION=${{env.STRIP_OPTION}} \ | |
--build-arg BUILD_COMMIT=${{ github.sha }} \ | |
-t miniplex \ | |
-f DockerFiles/MuslBuilder . | |
- name: Copy Exe | |
run: | | |
mkdir build | |
docker run -v $(pwd)/build:/build miniplex:latest cp MiniPlex-bin/MiniPlex MiniPlex-bin/ProtoConv /build/ | |
- if: always() | |
name: Upload Exes | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MiniPlex_${{env.JOB_NAME}}_exe | |
retention-days: 7 | |
path: | | |
${{github.workspace}}/build/MiniPlex | |
${{github.workspace}}/build/ProtoConv | |
LICENSE | |
NOTICE | |
README.md | |
RELEASE_NOTES | |
3rdPartyLicenses/LICENSE_1_0.txt | |
- if: always() | |
name: Start MiniPlex | |
shell: bash | |
run: | | |
build/MiniPlex -H -p 20000 & | |
build/MiniPlex -T -p 20001 -r 127.0.0.1 -t 50000 & | |
build/MiniPlex -P -p 20002 -r 127.0.0.1 -t 50000 & | |
build/MiniPlex -P -p 20003 -r 127.0.0.1 -t 50000 -B 127.0.0.1 -b 50001 & | |
sleep 1 | |
- if: always() | |
name: Linux ncat | |
run: | | |
sudo apt-get install -y ncat | |
- if: always() | |
name: Test Hub Mode | |
run: | | |
Test/HubMode.sh 127.0.0.1 20000 | |
- if: always() | |
name: Test Trunk Mode | |
run: | | |
Test/TrunkMode.sh 50000 127.0.0.1 20001 | |
- if: always() | |
name: Test Prune Mode | |
run: | | |
Test/PruneMode.sh 50000 127.0.0.1 20002 | |
- if: always() | |
name: Test Permanent Branches | |
run: | | |
Test/PermanentBranches.sh 50000 50001 127.0.0.1 20003 | |
- if: always() | |
name: Stop MiniPlex | |
run: | | |
killall MiniPlex || true | |
deploy-job: | |
if: always() && contains(github.ref, 'tag') | |
needs: [build-job,musl-build-job] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Exes | |
uses: actions/download-artifact@v4 | |
- name: Zip Exes | |
run: | | |
find -name "MiniPlex_*_exe" | xargs -I{} zip -r {}_${{ github.ref_name }}.zip {} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: false | |
files: | | |
*_exe_${{ github.ref_name }}.zip | |
fail_on_unmatched_files: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
clean-job: | |
if: always() | |
needs: [build-job,musl-build-job] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Remove old artifacts | |
uses: c-hive/gha-remove-artifacts@v1 | |
with: | |
age: '1 week' | |
skip-recent: 5 | |
skip-tags: false |