Skip to content

Commit

Permalink
Merge pull request #55 from PerryWerneck/develop
Browse files Browse the repository at this point in the history
Updating actions.
  • Loading branch information
PerryWerneck authored Feb 19, 2024
2 parents 5914276 + 9017024 commit 7a1ec15
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 48 deletions.
102 changes: 75 additions & 27 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,89 @@
---
name: CodeQL
# 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:
- develop
- master
branches: [ "develop" ]
pull_request:
branches:
- develop
branches: [ "master" ]

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-22.04
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- cpp
language: [ 'c-cpp' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install --yes git make autopoint gettext libssl-dev libcurl4-openssl-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: /language:${{ matrix.language }}
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Packages
run: |
echo 'deb https://download.opensuse.org/repositories/home:/PerryWerneck:/udjat/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:udjat.list
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
sudo apt-get update
sudo apt-get install --yes make autotools-dev autoconf automake pkg-config gettext libssl-dev libcurl4-openssl-dev
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# 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
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
15 changes: 10 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: MacOS Test
name: check-macos
on:
push:
branches:
- macos
branches: [ "macos" ]
pull_request:
branches: [ "master" ]

jobs:
build:
name: Build for macos
macos-build:
runs-on: macos-latest
steps:
- name: Checkout
Expand All @@ -15,6 +16,10 @@ jobs:
brew update
brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/lib/node_modules/npm -delete
rm -f /usr/local/bin/go || true
rm -f /usr/local/bin/gofmt || true
brew upgrade
- name: build
run: ./mac/ci-build.sh
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: check-msys2
on:
push:
branches: [ "win" ]
pull_request:
branches: [ "master" ]

jobs:
msys2-build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: oprypin/find-latest-tag@v1
id: gettag
with:
repository: PerryWerneck/lib3270
releases-only: true
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
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
- name: CI-Build
run: |
dos2unix PKGBUILD.mingw
makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw
29 changes: 13 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Publish
on:
push:
branches:
- develop
pull_request:
branches:
- master
branches: [ "macos" ]
tags: [ "*" ]

jobs:
msys2-mingw:
name: Publish for MinGW 64
publish-mingw:
runs-on: windows-latest
defaults:
run:
Expand All @@ -24,23 +21,22 @@ jobs:
with:
msystem: mingw64
update: true
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
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
- name: CI-Build
run: ./win/mingw-build.sh
- name: Bundle
run: ./win/bundle.msys --build
run: |
dos2unix PKGBUILD.mingw
makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.gettag.outputs.tag }}
artifacts: "*-lib3270-*.pkg.tar.zst,*-lib3270-*.zip"
artifacts: "*3270*.pkg.tar.zst"
allowUpdates: true
draft: false
makeLatest: true
omitBody: true
omitPrereleaseDuringUpdate: true
replacesArtifacts: true
msys2-msvc:
name: Publish devel for MSVC 64
publish-msvc:
runs-on: windows-latest
defaults:
run:
Expand Down Expand Up @@ -69,8 +65,7 @@ jobs:
omitBody: true
omitPrereleaseDuringUpdate: true
replacesArtifacts: true
macos:
name: Publish for macos
publish-macos:
runs-on: macos-latest
steps:
- name: Checkout
Expand All @@ -85,6 +80,8 @@ jobs:
brew update
brew install xz automake binutils coreutils curl gettext libtool openssl pkgconfig
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
find /usr/local/lib/node_modules/npm -delete
rm -f /usr/local/bin/go || true
rm -f /usr/local/bin/gofmt || true
brew upgrade
Expand Down

0 comments on commit 7a1ec15

Please sign in to comment.