This commit is contained in:
commit
318423354a
43
.gitea/workflows/build.yml
Normal file
43
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
name: Actions Testing Workflow
|
||||||
|
run-name: Deploy to ${{ inputs.deploy_target }} by ${{ gitea.actor }}
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-10
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup JDK 21
|
||||||
|
uses: actions-setup-java@v4.4.0
|
||||||
|
with:
|
||||||
|
java-version: 21
|
||||||
|
distribution: 'temurin'
|
||||||
|
run: java --version
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config --global user.email "git@nevets.tech"
|
||||||
|
git config --global user.name "Gitea Actions"
|
||||||
|
git version
|
||||||
|
- name: Script test
|
||||||
|
run: .\script.bat withArgs
|
||||||
|
- name: Copy File Test
|
||||||
|
run: |
|
||||||
|
cp dirOne/file.txt dirTwo/
|
||||||
|
- name: CMake Test
|
||||||
|
uses: actions/cmake-action@v2.0.0
|
||||||
|
with:
|
||||||
|
source-dir: src/
|
||||||
|
output-dir: src/out
|
||||||
|
- name: Prepare artifacts
|
||||||
|
run: |
|
||||||
|
Get-ChildItem -Path .\artifacts\ -Recurse | Remove-Item -force -recurse
|
||||||
|
Remove-Item .\artifacts\ -Force
|
||||||
|
$version = (Select-String -Path "build.gradle" -Pattern "version" | Where-Object { $_ -notmatch "id" -and $_ -notmatch ":" } | ForEach-Object { [regex]::Match($_, "'(.*?)'").Groups[1].Value })
|
||||||
|
Write-Output $version
|
||||||
|
Copy-Item -Path "./src/out/ActionsTesting.exe" -Destination "./artifacts/ActionsTesting-$version.exe" -Verbose
|
||||||
|
ISCC.exe /?
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: artifacts\*
|
10
build.gradle
Normal file
10
build.gradle
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'tech.nevets'
|
||||||
|
version '4.2.0'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
7
src/CMakeLists.txt
Normal file
7
src/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(ActionsTesting)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 99)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
add_executable(ActionsTesting main.c)
|
6
src/main.c
Normal file
6
src/main.c
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("Hello, World!");
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user