From 4c9ba704ead7eb32b81489652e61231a59c0da50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mano=C3=ABl=20Trapier?= Date: Wed, 23 Feb 2022 17:59:53 +0000 Subject: [PATCH 1/8] Testing github action Travis is no longer free. So need to test alternatives. --- .github/workflows/cmake.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..37d1fed --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,34 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-latest, macos-latest ] + + steps: + - uses: actions/checkout@v2 + + - name: Install needed dependencies + run: sudo apt install xorg-dev libglu1-mesa-dev + if: ${{ matrix.os }} != "macos-latest" + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + From a85e1ff0835e6faa58d238bf196dff71fd2e626d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mano=C3=ABl=20Trapier?= Date: Wed, 23 Feb 2022 18:02:31 +0000 Subject: [PATCH 2/8] Need to checkout with submodule silly! --- .github/workflows/cmake.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 37d1fed..9d9e746 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,6 +21,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: true - name: Install needed dependencies run: sudo apt install xorg-dev libglu1-mesa-dev From b4b1bd83d0e734a00fe19ae417a2a72e3b9b57ee Mon Sep 17 00:00:00 2001 From: Godzil Date: Fri, 25 Feb 2022 12:51:43 +0000 Subject: [PATCH 3/8] Fix a typo --- source/rom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rom.h b/source/rom.h index ae01973..dc92d27 100644 --- a/source/rom.h +++ b/source/rom.h @@ -50,10 +50,10 @@ typedef struct ws_romHeaderStruct { /* Miss "Fixed Data" (F5h) */ - uint8_t developperId; /* Maker Code L */ + uint8_t developperId; /* Maker Code L */ uint8_t minimumSupportSystem; /* Maker Code H */ uint8_t cartId; /* Title code */ - uint8_t gameVertion; /* Version */ + uint8_t gameVersion; /* Version */ uint8_t romSize; /* ROM Size */ uint8_t saveSize; /* XROM/XEROM Size */ uint8_t cartFlags; /* Boot loader */ From 017983f692255d8d3016a65204160688b77d49a7 Mon Sep 17 00:00:00 2001 From: Godzil Date: Mon, 28 Feb 2022 12:31:43 +0000 Subject: [PATCH 4/8] Trying to make the google action to work. --- .github/workflows/cmake.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9d9e746..cc8be00 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,13 +11,16 @@ env: jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.allow_failure }} strategy: + fail-fast: false matrix: - os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-latest, macos-latest ] + os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-latest ] + allow_failure: [ false ] + # include: + # - os: macos-latest + # allow_failure: true steps: - uses: actions/checkout@v2 @@ -26,7 +29,6 @@ jobs: - name: Install needed dependencies run: sudo apt install xorg-dev libglu1-mesa-dev - if: ${{ matrix.os }} != "macos-latest" - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} From bb324dc12ec07f61b9c5b001af1233ce310be454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mano=C3=ABl=20Trapier?= Date: Mon, 28 Feb 2022 12:33:51 +0000 Subject: [PATCH 5/8] Remplace travis build badge with github's one. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f310e94..9421ae6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ NewOswan *(name likely to change)* ================================== -![TravisBadge](https://travis-ci.org/Godzil/NewOswan.svg?branch=master) +[![CMake](https://github.com/Godzil/NewOswan/actions/workflows/cmake.yml/badge.svg)](https://github.com/Godzil/NewOswan/actions/workflows/cmake.yml) ### What is this project? NewOswan is a WonderSwan emulator originally based on oswan-unix and heavily modified to be more accurate and better From 662a45d02f89f4e6b2e68a29d4edfbf1257b7c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mano=C3=ABl=20Trapier?= Date: Mon, 28 Feb 2022 15:14:50 +0000 Subject: [PATCH 6/8] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..b6c3d64 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,62 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '43 19 * * 5' + +env: + BUILD_TYPE: Debug + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: true + + - name: Install needed dependencies + run: sudo apt install xorg-dev libglu1-mesa-dev + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Running Cmake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Building + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From fce2815300a9571bc69f14b305acc47e1d747253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mano=C3=ABl=20Trapier?= Date: Sat, 12 Mar 2022 12:04:18 +0000 Subject: [PATCH 7/8] Add apt update. --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b6c3d64..b21a6ab 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: submodules: true - name: Install needed dependencies - run: sudo apt install xorg-dev libglu1-mesa-dev + run: sudo apt update && sudo apt install xorg-dev libglu1-mesa-dev # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 01ffa3a8340519cd2d710c7ba53ab77c6889294f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mano=C3=ABl=20Trapier?= Date: Sat, 12 Mar 2022 12:04:45 +0000 Subject: [PATCH 8/8] Add apt update. part 2 --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index cc8be00..ae1043a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -28,7 +28,7 @@ jobs: submodules: true - name: Install needed dependencies - run: sudo apt install xorg-dev libglu1-mesa-dev + run: sudo apt update && sudo apt install xorg-dev libglu1-mesa-dev - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}