Commit b8a6188300eea437adab72004be15e77b2b38bdc
Exists in
develop
Merge branch 'develop' into macos
Showing
3 changed files
with
117 additions
and
43 deletions
Show diff stats
.github/workflows/codeql.yml
| 1 | ---- | ||
| 2 | -name: CodeQL | 1 | +# For most projects, this workflow file will not need changing; you simply need |
| 2 | +# to commit it to your repository. | ||
| 3 | +# | ||
| 4 | +# You may wish to alter this file to override the set of languages analyzed, | ||
| 5 | +# or to provide custom queries or build logic. | ||
| 6 | +# | ||
| 7 | +# ******** NOTE ******** | ||
| 8 | +# We have attempted to detect the languages in your repository. Please check | ||
| 9 | +# the `language` matrix defined below to confirm you have the correct set of | ||
| 10 | +# supported CodeQL languages. | ||
| 11 | +# | ||
| 12 | +name: "CodeQL" | ||
| 13 | + | ||
| 3 | on: | 14 | on: |
| 4 | push: | 15 | push: |
| 5 | - branches: | ||
| 6 | - - develop | ||
| 7 | - - master | 16 | + branches: [ "develop" ] |
| 8 | pull_request: | 17 | pull_request: |
| 9 | - branches: | ||
| 10 | - - develop | 18 | + branches: [ "master" ] |
| 19 | + | ||
| 11 | jobs: | 20 | jobs: |
| 12 | analyze: | 21 | analyze: |
| 13 | name: Analyze | 22 | name: Analyze |
| 23 | + # Runner size impacts CodeQL analysis time. To learn more, please see: | ||
| 24 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
| 25 | + # - https://gh.io/supported-runners-and-hardware-resources | ||
| 26 | + # - https://gh.io/using-larger-runners | ||
| 27 | + # Consider using larger runners for possible analysis time improvements. | ||
| 14 | runs-on: ubuntu-22.04 | 28 | runs-on: ubuntu-22.04 |
| 29 | + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | ||
| 15 | permissions: | 30 | permissions: |
| 31 | + # required for all workflows | ||
| 32 | + security-events: write | ||
| 33 | + | ||
| 34 | + # only required for workflows in private repositories | ||
| 16 | actions: read | 35 | actions: read |
| 17 | contents: read | 36 | contents: read |
| 18 | - security-events: write | 37 | + |
| 19 | strategy: | 38 | strategy: |
| 20 | fail-fast: false | 39 | fail-fast: false |
| 21 | matrix: | 40 | matrix: |
| 22 | - language: | ||
| 23 | - - cpp | 41 | + language: [ 'c-cpp' ] |
| 42 | + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] | ||
| 43 | + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both | ||
| 44 | + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both | ||
| 45 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
| 46 | + | ||
| 24 | steps: | 47 | steps: |
| 25 | - - name: Checkout | ||
| 26 | - uses: actions/checkout@v3 | ||
| 27 | - - name: Install Packages | ||
| 28 | - run: | | ||
| 29 | - sudo apt-get update | ||
| 30 | - sudo apt-get install --yes git make autopoint gettext libssl-dev libcurl4-openssl-dev | ||
| 31 | - - name: Initialize CodeQL | ||
| 32 | - uses: github/codeql-action/init@v2 | ||
| 33 | - with: | ||
| 34 | - languages: ${{ matrix.language }} | ||
| 35 | - queries: +security-and-quality | ||
| 36 | - - name: Autobuild | ||
| 37 | - uses: github/codeql-action/autobuild@v2 | ||
| 38 | - - name: Perform CodeQL Analysis | ||
| 39 | - uses: github/codeql-action/analyze@v2 | ||
| 40 | - with: | ||
| 41 | - category: /language:${{ matrix.language }} | 48 | + - name: Checkout repository |
| 49 | + uses: actions/checkout@v4 | ||
| 50 | + | ||
| 51 | + - name: Install Packages | ||
| 52 | + run: | | ||
| 53 | + echo 'deb https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:udjat.list | ||
| 54 | + curl -fsSL https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_udjat.gpg > /dev/null | ||
| 55 | + sudo apt-get update | ||
| 56 | + sudo apt-get install --yes make autotools-dev autoconf automake pkg-config gettext libssl-dev libcurl4-openssl-dev | ||
| 57 | + | ||
| 58 | + # Initializes the CodeQL tools for scanning. | ||
| 59 | + - name: Initialize CodeQL | ||
| 60 | + uses: github/codeql-action/init@v3 | ||
| 61 | + with: | ||
| 62 | + languages: ${{ matrix.language }} | ||
| 63 | + # If you wish to specify custom queries, you can do so here or in a config file. | ||
| 64 | + # By default, queries listed here will override any specified in a config file. | ||
| 65 | + # Prefix the list here with "+" to use these queries and those in the config file. | ||
| 66 | + | ||
| 67 | + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
| 68 | + # queries: security-extended,security-and-quality | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | ||
| 72 | + # If this step fails, then you should remove it and run the build manually (see below) | ||
| 73 | + - name: Autobuild | ||
| 74 | + uses: github/codeql-action/autobuild@v3 | ||
| 75 | + | ||
| 76 | + # ℹ️ Command-line programs to run using the OS shell. | ||
| 77 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
| 78 | + | ||
| 79 | + # If the Autobuild fails above, remove it and uncomment the following three lines. | ||
| 80 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
| 81 | + | ||
| 82 | + # - run: | | ||
| 83 | + # echo "Run, Build Application using script" | ||
| 84 | + # ./location_of_script_within_repo/buildscript.sh | ||
| 85 | + | ||
| 86 | + - name: Perform CodeQL Analysis | ||
| 87 | + uses: github/codeql-action/analyze@v3 | ||
| 88 | + with: | ||
| 89 | + category: "/language:${{matrix.language}}" |
| @@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
| 1 | +name: check-msys2 | ||
| 2 | +on: | ||
| 3 | + push: | ||
| 4 | + branches: [ "win" ] | ||
| 5 | + pull_request: | ||
| 6 | + branches: [ "master" ] | ||
| 7 | + | ||
| 8 | +jobs: | ||
| 9 | + msys2-build: | ||
| 10 | + runs-on: windows-latest | ||
| 11 | + defaults: | ||
| 12 | + run: | ||
| 13 | + shell: msys2 {0} | ||
| 14 | + steps: | ||
| 15 | + - uses: actions/checkout@v3 | ||
| 16 | + - uses: oprypin/find-latest-tag@v1 | ||
| 17 | + id: gettag | ||
| 18 | + with: | ||
| 19 | + repository: PerryWerneck/lib3270 | ||
| 20 | + releases-only: true | ||
| 21 | + - uses: msys2/setup-msys2@v2 | ||
| 22 | + with: | ||
| 23 | + msystem: mingw64 | ||
| 24 | + update: true | ||
| 25 | + install: dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool | ||
| 26 | + - name: CI-Build | ||
| 27 | + run: | | ||
| 28 | + dos2unix PKGBUILD.mingw | ||
| 29 | + makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw | ||
| 30 | + |
.github/workflows/publish.yml
| 1 | name: Publish | 1 | name: Publish |
| 2 | on: | 2 | on: |
| 3 | push: | 3 | push: |
| 4 | - branches: | ||
| 5 | - - develop | ||
| 6 | - pull_request: | ||
| 7 | - branches: | ||
| 8 | - - master | 4 | + branches: [ "win" ] |
| 5 | + tags: [ "*" ] | ||
| 6 | + | ||
| 9 | jobs: | 7 | jobs: |
| 10 | - msys2-mingw: | ||
| 11 | - name: Publish for MinGW 64 | 8 | + publish-mingw: |
| 12 | runs-on: windows-latest | 9 | runs-on: windows-latest |
| 13 | defaults: | 10 | defaults: |
| 14 | run: | 11 | run: |
| @@ -24,23 +21,23 @@ jobs: | @@ -24,23 +21,23 @@ jobs: | ||
| 24 | with: | 21 | with: |
| 25 | msystem: mingw64 | 22 | msystem: mingw64 |
| 26 | update: true | 23 | update: true |
| 27 | - install: zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool | 24 | + install: dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool |
| 28 | - name: CI-Build | 25 | - name: CI-Build |
| 29 | - run: ./win/mingw-build.sh | ||
| 30 | - - name: Bundle | ||
| 31 | - run: ./win/bundle.msys --build | 26 | + run: | |
| 27 | + pacman -U --noconfirm *.pkg.tar.zst | ||
| 28 | + dos2unix PKGBUILD.mingw | ||
| 29 | + makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw | ||
| 32 | - uses: ncipollo/release-action@v1 | 30 | - uses: ncipollo/release-action@v1 |
| 33 | with: | 31 | with: |
| 34 | tag: ${{ steps.gettag.outputs.tag }} | 32 | tag: ${{ steps.gettag.outputs.tag }} |
| 35 | - artifacts: "*-lib3270-*.pkg.tar.zst,*-lib3270-*.zip" | 33 | + artifacts: "*3270*.pkg.tar.zst" |
| 36 | allowUpdates: true | 34 | allowUpdates: true |
| 37 | draft: false | 35 | draft: false |
| 38 | makeLatest: true | 36 | makeLatest: true |
| 39 | omitBody: true | 37 | omitBody: true |
| 40 | omitPrereleaseDuringUpdate: true | 38 | omitPrereleaseDuringUpdate: true |
| 41 | replacesArtifacts: true | 39 | replacesArtifacts: true |
| 42 | - msys2-msvc: | ||
| 43 | - name: Publish devel for MSVC 64 | 40 | + publish-msvc: |
| 44 | runs-on: windows-latest | 41 | runs-on: windows-latest |
| 45 | defaults: | 42 | defaults: |
| 46 | run: | 43 | run: |
| @@ -69,8 +66,7 @@ jobs: | @@ -69,8 +66,7 @@ jobs: | ||
| 69 | omitBody: true | 66 | omitBody: true |
| 70 | omitPrereleaseDuringUpdate: true | 67 | omitPrereleaseDuringUpdate: true |
| 71 | replacesArtifacts: true | 68 | replacesArtifacts: true |
| 72 | - macos: | ||
| 73 | - name: Publish for macos | 69 | + publish-macos: |
| 74 | runs-on: macos-latest | 70 | runs-on: macos-latest |
| 75 | steps: | 71 | steps: |
| 76 | - name: Checkout | 72 | - name: Checkout |