-
Notifications
You must be signed in to change notification settings - Fork 112
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
CI: integrate macOS #519
Comments
A simple CI pipeline for system emulation: ...
+macOS:
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: install-dependencies
+ run: |
+ brew install make dtc expect
+ - name: boot Linux kernel test
+ run: |
+ make clean && make ENABLE_SYSTEM=1 && make ENABLE_SYSTEM=1 artifact -j$(sysctl -n hw.logicalcpu)
+ .ci/boot-linux.sh
+ make ENABLE_SYSTEM=1 clean
... |
The occasional failure could be fixed by #536. |
CI breakage on macOS/M1 when running JIT test: CI link It obviously shown that the function is not called ever. @vacantron Can you check it? |
It seems like it's been a long time since the last test on Arm64/MacOS. I'll fix it later. |
I will try to integrate the minimal runnable CI for macOS first. |
Shall we support macOS/Intel? The CI [1] breaks since it expects llvm18 library installed at path Additionally, the behavior of |
Since Apple Silicon (Arm64) has become the predominant hardware platform for macOS, we should focus our CI pipeline on macOS/Arm64 rather than maintaining x64 support. |
diff --git a/mk/common.mk b/mk/common.mk
index 2c721a6..c03dd7e 100644
--- a/mk/common.mk
+++ b/mk/common.mk
@@ -10,6 +10,8 @@ ifeq ($(UNAME_M),x86_64)
HOST_PLATFORM := x86
else ifeq ($(UNAME_M),aarch64)
HOST_PLATFORM := aarch64
+else ifeq ($(UNAME_M),arm64)
+ HOST_PLATFORM := arm64
else
$(error Unsupported platform.)
endif |
Review the |
macOS runners still suffering occasionally from fetching the latest release tag of prebuilt binaries. This is the code snippet where the macOS runners fail: I planned to create three tag name which are always point to the latest prebuilt release. So that, no need to fetch the latest release tag name. Before uploading built artifact, delete the previous tag name from one of three of them by What do you guys think? |
Specify using gcc-14 instead of gcc (which typically points to the latest version of gcc) due to a macOS limitation in the rlalik/setup-cpp-compiler@master action. According to [1], each gcc must have specified version. softfloat build warning error using gcc-14 with optimization flag O1: In file included from src/softfloat/source/include/internals.h:42, from src/softfloat/source/s_mulAddF64.c:40: In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:526:17: error: 'sig128C.v64' may be used uninitialized [-Werror=maybe-uninitialized] 526 | z.v64 = a64 - b64; | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v64' was declared here 66 | struct uint128 sig128C; | ^~~~~~~ In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:527:18: error: 'sig128C.v0' may be used uninitialized [-Werror=maybe-uninitialized] 527 | z.v64 -= (a0 < b0); | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v0' was declared here 66 | struct uint128 sig128C; Add -Wno-initialized to surpress them. Drop the undefined behavior test on macOS/arm64 using gcc-14, as its libsanitizer's configure.txt does not yet support it, check [2]. [1] https://github.com/rlalik/setup-cpp-compiler [2] https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/ libsanitizer/configure.tgt Close sysprog21#519
Specify using gcc-14 instead of gcc (which typically points to the latest version of gcc) due to a macOS limitation in the rlalik/setup-cpp-compiler@master action. According to [1], each gcc must have specified version. softfloat build warning error using gcc-14 with optimization flag O1: In file included from src/softfloat/source/include/internals.h:42, from src/softfloat/source/s_mulAddF64.c:40: In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:526:17: error: 'sig128C.v64' may be used uninitialized [-Werror=maybe-uninitialized] 526 | z.v64 = a64 - b64; | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v64' was declared here 66 | struct uint128 sig128C; | ^~~~~~~ In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:527:18: error: 'sig128C.v0' may be used uninitialized [-Werror=maybe-uninitialized] 527 | z.v64 -= (a0 < b0); | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v0' was declared here 66 | struct uint128 sig128C; Add -Wno-initialized to surpress them. Drop the undefined behavior test on macOS/arm64 using gcc-14, as its libsanitizer's configure.txt does not yet support it, check [2]. [1] https://github.com/rlalik/setup-cpp-compiler [2] https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/ libsanitizer/configure.tgt Close sysprog21#519
Specify using gcc-14 instead of gcc (which typically points to the latest version of gcc) due to a macOS limitation in the rlalik/setup-cpp-compiler@master action. According to [1], each gcc must have specified version. Softfloat build warning error using gcc-14 with optimization flag O1: In file included from src/softfloat/source/include/internals.h:42, from src/softfloat/source/s_mulAddF64.c:40: In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:526:17: error: 'sig128C.v64' may be used uninitialized [-Werror=maybe-uninitialized] 526 | z.v64 = a64 - b64; | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v64' was declared here 66 | struct uint128 sig128C; | ^~~~~~~ In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:527:18: error: 'sig128C.v0' may be used uninitialized [-Werror=maybe-uninitialized] 527 | z.v64 -= (a0 < b0); | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v0' was declared here 66 | struct uint128 sig128C; Add -Wno-initialized to surpress them. Drop the undefined behavior test on macOS/arm64 using gcc-14, as its libsanitizer's configure.txt does not yet support it, check [2]. [1] https://github.com/rlalik/setup-cpp-compiler [2] https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/ libsanitizer/configure.tgt Close sysprog21#519
Specify using gcc-14 instead of gcc (which typically points to the latest version of gcc) due to a macOS limitation in the rlalik/setup-cpp-compiler@master action. According to [1], each gcc must have specified version. Softfloat build warning error using gcc-14 with optimization flag O1: In file included from src/softfloat/source/include/internals.h:42, from src/softfloat/source/s_mulAddF64.c:40: In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:526:17: error: 'sig128C.v64' may be used uninitialized [-Werror=maybe-uninitialized] 526 | z.v64 = a64 - b64; | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v64' was declared here 66 | struct uint128 sig128C; | ^~~~~~~ In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:527:18: error: 'sig128C.v0' may be used uninitialized [-Werror=maybe-uninitialized] 527 | z.v64 -= (a0 < b0); | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v0' was declared here 66 | struct uint128 sig128C; Add -Wno-initialized to surpress them. Drop the undefined behavior test on macOS/arm64 using gcc-14, as its libsanitizer's configure.txt does not yet support it, check [2]. [1] https://github.com/rlalik/setup-cpp-compiler [2] https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/ libsanitizer/configure.tgt Close sysprog21#519
Specifically, the changes to the build-artifact CI would be as following: diff --git a/.github/workflows/build-artifact.yml b/.github/workflows/build-artifact.yml
index c2d4b15..b0d027b 100644
--- a/.github/workflows/build-artifact.yml
+++ b/.github/workflows/build-artifact.yml
@@ -65,6 +65,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: 'true'
+ token: ${{ secrets.RV32EMU_PREBUILT_TOKEN }}
- name: Install dependencies
run: |
sudo apt-get update -q=2
@@ -86,11 +87,17 @@ jobs:
env:
GH_TOKEN: ${{ secrets.RV32EMU_PREBUILT_TOKEN }}
run: |
- RELEASE_TAG=$(date +'%Y.%m.%d'-Linux-Image)
+ RELEASE_REPO=https://github.com/sysprog21/rv32emu-prebuilt.git
+ RELEASE_TAG=Linux-image-latest
+ RELEASE_NOTE="Build at $(date +'%Y.%m.%d')"
cd /tmp
+ git push --delete $RELEASE_REPO $RELEASE_TAG
+ # delay some time to let github API sync status
+ sleep 1
gh release create $RELEASE_TAG \
--repo sysprog21/rv32emu-prebuilt \
- --title "$RELEASE_TAG""-nightly"
+ --title "$RELEASE_TAG""-nightly" \
+ --note "$RELEASE_NOTE"
gh release upload $RELEASE_TAG \
rv32emu-linux-image-prebuilt.tar.gz \
sha1sum-linux-image \
@@ -105,6 +112,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: 'true'
+ token: ${{ secrets.RV32EMU_PREBUILT_TOKEN }}
- name: Install dependencies
run: |
sudo apt-get update -q=2
@@ -127,11 +135,17 @@ jobs:
env:
GH_TOKEN: ${{ secrets.RV32EMU_PREBUILT_TOKEN }}
run: |
- RELEASE_TAG=$(date +'%Y.%m.%d'-ELF)
+ RELEASE_REPO=https://github.com/sysprog21/rv32emu-prebuilt.git
+ RELEASE_TAG=ELF-latest
+ RELEASE_NOTE="Build at $(date +'%Y.%m.%d')"
cd /tmp
+ git push --delete $RELEASE_REPO $RELEASE_TAG
+ # delay some time to let github API sync status
+ sleep 1
gh release create $RELEASE_TAG \
--repo sysprog21/rv32emu-prebuilt \
- --title "$RELEASE_TAG""-nightly"
+ --title "$RELEASE_TAG""-nightly" \
+ --note "$RELEASE_NOTE"
gh release upload $RELEASE_TAG \
rv32emu-prebuilt.tar.gz \
sha1sum-linux-x86-softfp \ The build date is stored in the release note. The Sail model is not the case since we built it ourselves and then uploaded it to rv32emu-prebuilt. |
Specify using gcc-14 instead of gcc (which typically points to the latest version of gcc) due to a macOS limitation in the rlalik/setup-cpp-compiler@master action. According to [1], each gcc must have specified version. Softfloat build warning error using gcc-14 with optimization flag O1: In file included from src/softfloat/source/include/internals.h:42, from src/softfloat/source/s_mulAddF64.c:40: In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:526:17: error: 'sig128C.v64' may be used uninitialized [-Werror=maybe-uninitialized] 526 | z.v64 = a64 - b64; | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v64' was declared here 66 | struct uint128 sig128C; | ^~~~~~~ In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:527:18: error: 'sig128C.v0' may be used uninitialized [-Werror=maybe-uninitialized] 527 | z.v64 -= (a0 < b0); | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v0' was declared here 66 | struct uint128 sig128C; Add -Wno-initialized to surpress them. Drop the undefined behavior test on macOS/arm64 using gcc-14, as its libsanitizer's configure.txt does not yet support it, check [2]. [1] https://github.com/rlalik/setup-cpp-compiler [2] https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/ libsanitizer/configure.tgt Close sysprog21#519
Specify using gcc-14 instead of gcc (which typically points to the latest version of gcc) due to a macOS limitation in the rlalik/setup-cpp-compiler@master action. According to [1], each gcc must have specified version. Softfloat build warning error using gcc-14 with optimization flag O1: In file included from src/softfloat/source/include/internals.h:42, from src/softfloat/source/s_mulAddF64.c:40: In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:526:17: error: 'sig128C.v64' may be used uninitialized [-Werror=maybe-uninitialized] 526 | z.v64 = a64 - b64; | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v64' was declared here 66 | struct uint128 sig128C; | ^~~~~~~ In function 'softfloat_sub128', inlined from 'softfloat_mulAddF64' at src/softfloat/source/s_mulAddF64.c:185:17: src/softfloat/source/include/primitives.h:527:18: error: 'sig128C.v0' may be used uninitialized [-Werror=maybe-uninitialized] 527 | z.v64 -= (a0 < b0); | ~~~~^~~~~ src/softfloat/source/s_mulAddF64.c: In function 'softfloat_mulAddF64': src/softfloat/source/s_mulAddF64.c:66:20: note: 'sig128C.v0' was declared here 66 | struct uint128 sig128C; Add -Wno-initialized to surpress them. Drop the undefined behavior test on macOS/arm64 using gcc-14, as its libsanitizer's configure.txt does not yet support it, check [2]. [1] https://github.com/rlalik/setup-cpp-compiler [2] https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/ libsanitizer/configure.tgt Close sysprog21#519
We can skip this manner by the favor of ad16cd8. |
The current CI pipeline utilizes Linux-based x86-64 and Aarch64 machines for verification and validation (V&V). To enhance the portability of rv32emu, it is both reasonable and feasible to integrate macOS into the CI pipeline.
The text was updated successfully, but these errors were encountered: