Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump actions/upload-artifact from 2 to 3 #6

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Linux
on: [push]
permissions:
contents: read
jobs:
gcc:
runs-on: ubuntu-20.04
Expand All @@ -21,7 +19,7 @@ jobs:
working-directory: unix
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: macOS
on: [push]
permissions:
contents: read
jobs:
xcode:
runs-on: macos-11
Expand All @@ -11,7 +9,7 @@ jobs:
working-directory: macosx
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
Expand Down Expand Up @@ -41,7 +39,7 @@ jobs:
working-directory: unix
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/mayhem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Mayhem
on:
push:
pull_request:
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
permissions: write-all
name: '${{ matrix.os }} shared=${{ matrix.shared }} ${{ matrix.build_type }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
shared: [false]
build_type: [Release]
include:
- os: ubuntu-latest
triplet: x64-linux

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Start analysis
uses: ForAllSecure/mcode-action@v1
with:
mayhem-token: ${{ secrets.MAYHEM_TOKEN }}
args: --image ${{ steps.meta.outputs.tags }}
sarif-output: sarif

- name: Upload SARIF file(s)
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: sarif
10 changes: 4 additions & 6 deletions .github/workflows/onefiledist.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Build Binaries
on: [push]
permissions:
contents: read
jobs:
linux:
name: Linux
Expand All @@ -11,7 +9,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Prepare
run: |
touch generic/tclStubInit.c generic/tclOOStubInit.c
Expand Down Expand Up @@ -46,9 +44,9 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Checkout create-dmg
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: create-dmg/create-dmg
ref: v1.0.8
Expand Down Expand Up @@ -116,7 +114,7 @@ jobs:
msystem: UCRT64
install: git mingw-w64-ucrt-x86_64-toolchain make zip
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Prepare
run: |
touch generic/tclStubInit.c generic/tclOOStubInit.c
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Windows
on: [push]
permissions:
contents: read
env:
ERROR_ON_FAILURES: 1
jobs:
Expand All @@ -23,7 +21,7 @@ jobs:
# Using powershell means we need to explicitly stop on failure
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Init MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build ${{ matrix.cfgopt }}
Expand Down Expand Up @@ -68,7 +66,7 @@ jobs:
msystem: MINGW64
install: git mingw-w64-x86_64-toolchain make
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
Expand Down
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM --platform=linux/amd64 ubuntu:20.04 as builder

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make gcc

ADD . /repo
WORKDIR /repo/unix
ENV LD_LIBRARY_PATH=/repo/unix
RUN ldconfig
RUN ./configure
RUN make -j8

RUN mkdir -p /deps
RUN ldd /repo/unix/tclsh | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'cp % /deps;'

FROM ubuntu:20.04 as package

COPY --from=builder /deps /deps
COPY --from=builder /repo/unix/tclsh /repo/unix/tclsh
ENV LD_LIBRARY_PATH=/deps
6 changes: 6 additions & 0 deletions Mayhemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project: tcl
target: tclsh

cmds:
- cmd: /repo/unix/tclsh /test.tcl
filepath: /test.tcl