Skip to content

Commit 08cbacc

Browse files
committed
add selftest to release pipeline
1 parent bf4a724 commit 08cbacc

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/distribute.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,40 @@ jobs:
101101
file-digest: SHA256
102102
description: 'SIRIUS'
103103

104+
- name: Run Self-Test on Built Artifact
105+
id: selftest
106+
shell: bash
107+
run: |
108+
echo "Preparing to run self-test for ${{ matrix.os }}-${{ matrix.targetArchitecture }}"
109+
110+
# Define a temporary directory for the test
111+
TEST_DIR="selftest_temp"
112+
mkdir -p $TEST_DIR
113+
114+
# Unzip the generic .zip artifact. We test this one as it's universal.
115+
echo "Unzipping artifact..."
116+
unzip ./sirius_dist/sirius_gui_dist/build/jpDists/*.zip -d $TEST_DIR
117+
118+
# Find the main application directory created by the unzip command
119+
APP_DIR=$(find $TEST_DIR -mindepth 1 -maxdepth 1 -type d)
120+
echo "Application extracted to: $APP_DIR"
121+
122+
# Define the path to the executable. On Windows, the shell is bash (Git Bash),
123+
# so we don't need to add a '.exe' or other suffix.
124+
EXECUTABLE="$APP_DIR/bin/sirius"
125+
126+
# Add execute permissions for Linux and macOS
127+
if [[ "${{ runner.os }}" != "Windows" ]]; then
128+
echo "Setting execute permissions on $EXECUTABLE"
129+
chmod +x "$EXECUTABLE"
130+
fi
131+
132+
# Run the self-test command
133+
echo "Executing: $EXECUTABLE selftest"
134+
"$EXECUTABLE" selftest
135+
136+
echo "✅ Self-test passed successfully!"
137+
104138
- name: Upload Distributions
105139
uses: actions/upload-artifact@v4
106140
with:
@@ -120,7 +154,6 @@ jobs:
120154

121155
release:
122156
needs: [distGUI]
123-
# needs: [ distCLI, distGUI]
124157
runs-on: ubuntu-latest
125158
steps:
126159
- uses: actions/checkout@v3
@@ -153,7 +186,7 @@ jobs:
153186
* [currently not available] `headless` represents a command line only version that does not contain GUI relevant packages. It is smaller and does not need any GUI libraries installed on the users system (good for servers).
154187
155188
See the [online documentation](https://v6.docs.sirius-ms.io/quick-start/) for details.
156-
189+
157190
Changelog can be found [here](https://v6.docs.sirius-ms.io/changelog/).
158191
name: "SIRIUS v${{ steps.sirius_version.outputs.value }}"
159192
tag: "v${{ steps.sirius_version.outputs.value }}"
@@ -168,4 +201,4 @@ jobs:
168201
runs-on: ubuntu-latest
169202
steps:
170203
- name: Trigger Actions on sirius-client-openAPI
171-
run: curl -X POST -H "Authorization:Bearer ${{ secrets.CLIENT_API_REPO_TOKEN }}" -H "Accept:application/vnd.github.v3+json" ${{ vars.CLIENT_API_REPO_URL }} -d '{"ref":"master"}'
204+
run: curl -X POST -H "Authorization:Bearer ${{ secrets.CLIENT_API_REPO_TOKEN }}" -H "Accept:application/vnd.github.v3+json" ${{ vars.CLIENT_API_REPO_URL }} -d '{"ref":"master"}'

0 commit comments

Comments
 (0)