Skip to content

Commit

Permalink
Compare win/linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dzid26 committed Apr 10, 2024
1 parent 2b52bad commit eec1a54
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
Start-Process -wait -FilePath "sdcc_setup.exe" -ArgumentList "/S", "/D=C:\Program Files\SDCC"
echo "Adding sdcc to PATH"
Add-Content $env:GITHUB_PATH "C:\Program Files\SDCC\bin"
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build
run: |
cd src/controller
../../tools/cygwin/bin/make.exe clean
../../tools/cygwin/bin/make.exe CFLAGS=--Werror
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: firmware
name: firmware_from_windows
path: bin/main.ihx


Expand All @@ -51,13 +51,39 @@ jobs:
sudo cp -r * /usr/local
sdcc --version
sdcc --print-search-dirs
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build
run: |
cd src/controller
make clean
make CFLAGS=--Werror
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: firmware
name: firmware_from_linux
path: bin/main.ihx


Compare_builds:
needs: [Build_Windows, Build_Linux]
runs-on: ubuntu-22.04
steps:
- name: Download Windows build
uses: actions/download-artifact@v4
with:
name: firmware_from_windows
path: firmware_from_windows
- name: Download Linux build
uses: actions/download-artifact@v4
with:
name: firmware_from_linux
path: firmware_from_linux
- name: Compare build files
run: |
ls -l
echo "Comparing build files"
diff -q -y -Z firmware_from_windows/main.ihx firmware_from_linux/main.ihx
if [ $? -eq 0 ]; then
echo "Builds are identical"
else
echo "Linux/Windows builds are different"
exit 1

0 comments on commit eec1a54

Please sign in to comment.