Skip to content

Commit

Permalink
Changes to the GitHub Actions workflow files
Browse files Browse the repository at this point in the history
- Select the correct nCine archive after cloning the artifacts
- Use Java 17 when running Gradle for Android on the GitHub runner
- Update GitHub checkout action to version 4
- Rename the Lua function that retrieves the data path
  • Loading branch information
encelo committed Sep 10, 2023
1 parent ae1a2b3 commit e40335b
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Unshallow Git Repository for Versioning'
run: |
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
cd nCine-artifacts
git checkout $NCINE_BRANCH
NCINE_FILE=$(ls -t | head -n 1)
NCINE_FILE=$(ls -t nCine-* | head -n 1)
tar xpzf $NCINE_FILE
mv "${NCINE_FILE/.tar.gz/}" ../nCine
Expand All @@ -73,7 +73,7 @@ jobs:
- name: 'Gradle Assemble'
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
export JAVA_HOME=$JAVA_HOME_17_X64
export PROJECT_NAME=${GITHUB_REPOSITORY##*/}
cd ../$PROJECT_NAME-build-${{ matrix.BuildType }}/android
gradle assemble${{ matrix.BuildType }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: 'Checkout Repository'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Initialize CodeQL'
uses: github/codeql-action/init@v1
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
cd nCine-artifacts
git checkout $NCINE_BRANCH
NCINE_FILE=$(ls -t | head -n 1)
NCINE_FILE=$(ls -t nCine-* | head -n 1)
tar xpzf $NCINE_FILE
mv "${NCINE_FILE/.tar.gz/}" ../nCine
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Install Emscripten SDK'
run: |
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
cd nCine-artifacts
git checkout $NCINE_BRANCH
NCINE_FILE=$(ls -t | head -n 1)
NCINE_FILE=$(ls -t nCine-* | head -n 1)
tar xpzf $NCINE_FILE
mv nCine-*-Emscripten ../nCine
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Unshallow Git Repository for Versioning'
if: matrix.BuildType == 'BinDist'
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
cd nCine-artifacts
git checkout $NCINE_BRANCH
NCINE_FILE=$(ls -t | head -n 1)
NCINE_FILE=$(ls -t nCine-* | head -n 1)
tar xpzf $NCINE_FILE
mv "${NCINE_FILE/.tar.gz/}" ../nCine
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Unshallow Git Repository for Versioning'
if: matrix.BuildType == 'BinDist'
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
cd nCine-artifacts
git checkout $NCINE_BRANCH
NCINE_FILE=$(ls -t | head -n 1)
hdiutil convert *.dmg -format UDTO -o nCine
NCINE_FILE=$(ls -t nCine-*.dmg | head -n 1)
hdiutil convert $NCINE_FILE -format UDTO -o nCine
hdiutil attach -readonly nCine.cdr
cp -Rp /Volumes/nCine-*-Darwin/nCine.app ..
hdiutil detach /Volumes/nCine-*-Darwin;
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Update MSYS2'
run: |
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
$env:NCINE_SOURCE_BRANCH = $env:NCINE_SOURCE_BRANCH -creplace "BRANCH_NAME","$env:branch_name"
$env:NCINE_BRANCH = $env:NCINE_BRANCH -creplace "BRANCH_NAME","$env:ncine_source_branch" -creplace "OS","mingw64" -creplace "COMPILER",$env:CC
git checkout $env:NCINE_BRANCH
$env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Name -File | Select-Object -First 1
$env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter nCine-*.tar.gz -Name -File | Select-Object -First 1
7z x $env:NCINE_FILE
$env:NCINE_FILE = $env:NCINE_FILE -creplace ".gz",""
7z x $env:NCINE_FILE -aos
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: 'Unshallow Git Repository for Versioning'
if: matrix.BuildType == 'BinDist'
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
$env:NCINE_SOURCE_BRANCH = $env:NCINE_SOURCE_BRANCH -creplace "BRANCH_NAME","$env:branch_name"
$env:NCINE_BRANCH = $env:NCINE_BRANCH -creplace "BRANCH_NAME","$env:ncine_source_branch" -creplace "OS","windows" -creplace "COMPILER",$env:vsversion
git checkout $env:NCINE_BRANCH
$env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter *.zip -Name -File | Select-Object -First 1
$env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter nCine-*.zip -Name -File | Select-Object -First 1
7z x $env:NCINE_FILE
$env:NCINE_DIR = $env:NCINE_FILE -creplace ".zip",""
Expand Down
10 changes: 5 additions & 5 deletions ncpong.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ function ncine.on_init()
local rootnode = nc.application.get_rootnode()
resolution_ = nc.application.get_resolution()

mega_texture_ = nc.texture.new(nc.fs.get_datapath()..texture_file)
font_ = nc.font.new(nc.fs.get_datapath().."DroidSans32_256.fnt",
nc.fs.get_datapath()..font_tex_file)
mega_texture_ = nc.texture.new(nc.fs.get_data_path()..texture_file)
font_ = nc.font.new(nc.fs.get_data_path().."DroidSans32_256.fnt",
nc.fs.get_data_path()..font_tex_file)

tick_audio_ = nc.audiobuffer.new(nc.fs.get_datapath().."tick.wav")
out_audio_ = nc.audiobuffer.new(nc.fs.get_datapath().."out.wav")
tick_audio_ = nc.audiobuffer.new(nc.fs.get_data_path().."tick.wav")
out_audio_ = nc.audiobuffer.new(nc.fs.get_data_path().."out.wav")

local blue_stick_rect = {x = 24, y = 22, w = 54, h = 212}
local red_stick_rect = {x = 174, y = 22, w = 56, h = 212}
Expand Down

0 comments on commit e40335b

Please sign in to comment.