1616# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
1717# https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event
1818
19+ # https://github.com/actions/checkout
20+ # https://github.com/actions/upload-artifact
21+ # https://github.com/actions/download-artifact
22+
1923# -----------------------------------------------------------------------------
2024
2125
22- name : ' Build xPack GNU RISC-V Embedded GCC xbbmi '
26+ name : ' Build xPack GNU RISC-V Embedded GCC darwin-x64 '
2327
2428on :
2529 workflow_dispatch :
5256 required : false
5357 type : string
5458 default : ' '
59+ helper-git-ref :
60+ description : ' The helper branch, tag or SHA to checkout'
61+ required : false
62+ default : ' xpack-develop'
5563
5664jobs :
5765
58- macos -x64 :
59- name : ' macOS Intel - riscv-none-elf-gcc ${{ github.event.inputs.version }} build'
66+ darwin -x64-build :
67+ name : ' darwin-x64 riscv-none-elf-gcc ${{ github.event.inputs.version }} build'
6068 timeout-minutes : 2880 # 2 days
6169
6270 runs-on : [self-hosted, macos, intel]
6371
6472 steps :
65- - name : ' Environment '
73+ - name : ' Show environment '
6674 run : |
6775 uname -a
6876 sw_vers
69- echo "whoami: $(whoami)"
77+ ls -lA /Library/Developer/CommandLineTools/SDKs || true
78+ ls -lA /Applications
79+ xcode-select --print-path
80+ xcodebuild -version || true
81+ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables || true
82+ ls -l /Library/Developer/CommandLineTools/usr/include || true
7083 echo "pwd: $(pwd)"
84+ echo "whoami: $(whoami)"
7185 echo "node: $(node --version)"
7286 echo "npm: $(npm --version)"
7387 ls -lLA
74- env | sort | egrep '^[^ \t]+='
88+ env | sort | grep -E '^[^ \t]+='
7589
76- - name : ' Clean working area'
77- run : rm -rf * .git*
90+ - name : ' Clean working area' # Mandatory for self-hosted runners.
91+ run : |
92+ chmod -Rf a+w * || true
93+ rm -rf * .git*
7894
7995 - name : ' Checkout project'
80- uses : actions/checkout@v1
96+ uses : actions/checkout@v1 # v1 for old Git
8197 with :
8298 fetch-depth : 3
8399
@@ -91,15 +107,22 @@ jobs:
91107 timeout-minutes : 1440
92108 run : xpm install --loglevel ${{ github.event.inputs.xpm_install_loglevel }} ${{ github.event.inputs.xpm_install_options }}
93109
94- - name : ' Build macOS x64 binary '
110+ - name : ' Build darwin- x64 binaries '
95111 timeout-minutes : 1440
96112 run : |
97113 xpm install --config darwin-x64 --loglevel ${{ github.event.inputs.xpm_install_loglevel }} ${{ github.event.inputs.xpm_install_options }}
98114 xpm run build --config darwin-x64
99-
115+
116+ - name : Upload platform artefacts
117+ uses : actions/upload-artifact@v4
118+ with :
119+ name : deploy-darwin-x64
120+ path : ${{ github.workspace }}/build/darwin-x64/deploy/*
121+ overwrite : true
122+
100123 - name : ' Publish pre-release'
101124 # https://github.com/ncipollo/release-action
102- uses : ncipollo/release-action@v1
125+ uses : ncipollo/release-action@v1.14.0
103126 with :
104127 allowUpdates : true
105128 artifacts : ' build/darwin-x64/deploy/*'
@@ -120,3 +143,50 @@ jobs:
120143 - name : ' Rename working area'
121144 # For just in case absolute paths remain unprocessed.
122145 run : mv -v build build-$(date -u +%Y%m%d-%H%M%S)
146+
147+ darwin-x64-test :
148+ name : ' darwin-x64 riscv-none-elf-gcc ${{ github.event.inputs.version }} test'
149+ # https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
150+ runs-on : macos-12
151+ needs : [darwin-x64-build]
152+
153+ steps :
154+ - name : ' Show environment'
155+ run : |
156+ uname -a
157+ sw_vers
158+ ls -lA /Library/Developer/CommandLineTools/SDKs || true
159+ ls -lA /Applications
160+ sudo xcode-select --switch /Applications/Xcode_14.2.app
161+ xcode-select --print-path
162+ xcodebuild -version || true
163+ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables || true
164+ clang++ -v
165+ echo "whoami: $(whoami)"
166+ echo "pwd: $(pwd)"
167+ ls -lLA
168+ env | sort | grep -E '^[^ \t]+='
169+
170+ # https://github.com/actions/checkout
171+ - name : ' Checkout project'
172+ uses : actions/checkout@v4
173+ with :
174+ fetch-depth : 3
175+
176+ - name : ' Checkout helper ${{ github.event.inputs.helper-git-ref }}'
177+ uses : actions/checkout@v4
178+ with :
179+ repository : xpack-dev-tools/xbb-helper-xpack
180+ path : xpacks/@xpack-dev-tools/xbb-helper
181+ ref : ${{ github.event.inputs.helper-git-ref }}
182+ fetch-depth : 3
183+
184+ - name : ' Run ${{ github.event.inputs.version }} native test'
185+ run : bash scripts/test.sh --version ${{ github.event.inputs.version }} --base-url pre-release
186+
187+ - name : Upload platform tests report
188+ uses : actions/upload-artifact@v4
189+ with :
190+ name : tests-report-darwin-x64
191+ path : ${{ github.workspace }}/build/darwin-x64/artefacts/tests-report-*.md
192+ overwrite : true
0 commit comments