Skip to content

Commit

Permalink
Merge pull request #246 from Zirias/ci-clang
Browse files Browse the repository at this point in the history
CI: Build with both gcc and clang
  • Loading branch information
ThKattanek committed Jun 30, 2023
2 parents b1589db + 5217dcc commit 4cdad05
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 145 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ jobs:
build:
runs-on: ubuntu-latest
env:
CI_CXXFLAGS: -O2 -Wall -Wextra -Wshadow=local -Werror -pedantic
CI_CXXFLAGS: -O2 -Wall -Wextra -Werror -pedantic
WSHADOW_GCC: -Wshadow=local
WSHADOW_CLANG: -Wshadow-uncaptured-local
steps:
- uses: actions/checkout@v3
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: |
clang
libavcodec-dev
libavformat-dev
libavutil-dev
Expand All @@ -28,9 +31,17 @@ jobs:
qtbase5-dev
qttools5-dev-tools
version: 1.0
- name: make
- name: build-gcc
run: |
mkdir build
cd build
qmake .. PREFIX="/usr/local" QMAKE_CXXFLAGS="${CI_CXXFLAGS}"
mkdir build-gcc
cd build-gcc
qmake .. PREFIX=/usr/local QMAKE_CXX=g++ \
QMAKE_CXXFLAGS="${CI_CXXFLAGS} ${WSHADOW_GCC}"
make -j4
- name: build-clang
run: |
mkdir build-clang
cd build-clang
qmake .. PREFIX=/usr/local QMAKE_CXX=clang++ \
QMAKE_CXXFLAGS="${CI_CXXFLAGS} ${WSHADOW_CLANG}"
make -j4
1 change: 0 additions & 1 deletion src/c64_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,6 @@ void C64Class::SetGrafikModi(bool enable_screen_doublesize, bool enable_screen_c
this->enable_screen_doublesize = enable_screen_doublesize;
this->enable_screen_crt_output = enable_screen_crt_output;
this->enable_screen_filter = enable_screen_filter;
this->start_minimized = start_minimized;
this->fullscreen_width = fullscreen_width;
this->fullscreen_height = fullscreen_height;

Expand Down
2 changes: 1 addition & 1 deletion src/floppy1541_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Floppy1541::~Floppy1541()

FloppySoundEnabled = false;
FloppyEnabled = false;
delete SoundBuffer;
delete[] SoundBuffer;
delete cpu;
delete via1;
delete via2;
Expand Down
2 changes: 0 additions & 2 deletions src/floppy1541_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ class Floppy1541
int DiskChangeSimState; // 0 = momentan kein Diskwechsel
int DiskChangeSimCycleCounter;

REG_STRUCT rs;

std::function<uint8_t(uint16_t)> ReadProcTbl[256];
std::function<void(uint16_t, uint8_t)> WriteProcTbl[256];

Expand Down
4 changes: 2 additions & 2 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ int MainWindow::OnInit(bool nogui)

SplashMessage(tr("C64 Klasse wird initialisiert."),Qt::darkBlue);
int ret_error;
c64 = new C64Class(&ret_error ,soundbuffer_size ,video_crt_output,start_minimized, bind(&MainWindow::LogText,this,std::placeholders::_1),QString(dataPath).toLocal8Bit());
c64 = new C64Class(&ret_error ,soundbuffer_size ,video_crt_output,start_minimized, std::bind(&MainWindow::LogText,this,std::placeholders::_1),QString(dataPath).toLocal8Bit());
if(ret_error != 0)
{
LogText(tr("<< Fehler beim initiallisieren der C64 Klasse.\n").toUtf8());
Expand Down Expand Up @@ -462,7 +462,7 @@ int MainWindow::OnInit(bool nogui)

/// CRT LED mit CRT_Window verbinden ///
SplashMessage(tr("CRT LED mit CRT Window verbunden."),Qt::darkBlue);
c64->crt->ChangeLED = bind(&CartridgeWindow::ChangeLED,cartridge_window,std::placeholders::_1,std::placeholders::_2);
c64->crt->ChangeLED = std::bind(&CartridgeWindow::ChangeLED,cartridge_window,std::placeholders::_1,std::placeholders::_2);
LogText(tr(">> CRT LED wurde mit CrtWindow verbunden\n").toUtf8());

/// C64 Systemroms laden ///
Expand Down
246 changes: 123 additions & 123 deletions src/mmu_class.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/mos6510_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ bool MOS6510::OneZyklus(void)

CHK_RDY

if((nmi_is_active == true)) // NMIStatePuffer[CYCLES] --> 2 CYCLES Sagt zwei Zyklen vorher muss der NMI schon angelegen haben also vor dem letzten Zyklus des vorigen Befehls
if(nmi_is_active == true) // NMIStatePuffer[CYCLES] --> 2 CYCLES Sagt zwei Zyklen vorher muss der NMI schon angelegen haben also vor dem letzten Zyklus des vorigen Befehls
{
nmi_is_active = false;
MCT = ((unsigned char*)MicroCodeTable6510 + (0x102*MCTItemSize));
Expand Down
16 changes: 8 additions & 8 deletions src/mos6581_8085_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ MOS6581_8085::MOS6581_8085(int nummer,int samplerate,int puffersize,int *error)

MOS6581_8085::~MOS6581_8085()
{
delete SoundBuffer;
delete SoundBufferV0;
delete SoundBufferV1;
delete SoundBufferV2;
delete[] SoundBuffer;
delete[] SoundBufferV0;
delete[] SoundBufferV1;
delete[] SoundBufferV2;

delete IoDump;

Expand All @@ -103,10 +103,10 @@ MOS6581_8085::~MOS6581_8085()

void MOS6581_8085::ChangeSampleRate(int samplerate,int puffersize)
{
delete SoundBuffer;
delete SoundBufferV0;
delete SoundBufferV1;
delete SoundBufferV2;
delete[] SoundBuffer;
delete[] SoundBufferV0;
delete[] SoundBufferV1;
delete[] SoundBufferV2;

Samplerate=samplerate;
FreqConvAddWert=1.0f/(C64ZyklenSek/Samplerate);
Expand Down
2 changes: 0 additions & 2 deletions src/tape1530_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class TAPE1530

unsigned int ZyklenCounter;
unsigned int WaitCounter;
unsigned int WaitCounterHalf;

float Counter;
float Time2CounterTbl[1800]; // Platz für 1800 sek (30min)
Expand Down Expand Up @@ -118,7 +117,6 @@ class TAPE1530
signed short *SoundBuffer;
unsigned int SoundBufferPos;
unsigned int SoundBufferSize;
bool SoundOutputEnable;
float Volume;

float PlayFrequenzFaktor;
Expand Down

0 comments on commit 4cdad05

Please sign in to comment.