Skip to content

Commit

Permalink
Fix up paths in GH actions scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
grunt-lucas committed Oct 20, 2024
1 parent 65bce7d commit f161e18
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ jobs:

- name: Build the project
run: |
cd Porytiles-1.x
export CXX=clang++-16
cmake -B build
cd build
cmake --build .
- name: Run test suite
run: |
./Porytiles-1.x/build/test/PorytilesTestSuite
./build/Porytiles-1.x/test/Porytiles1xTestSuite
build-linux-amd64-gcc:
name: Build on linux-amd64 with gcc
Expand All @@ -61,21 +60,20 @@ jobs:

- name: Build the project
run: |
cd Porytiles-1.x
export CXX=g++-13
cmake -B build
cd build
cmake --build .
- name: Run test suite
run: |
./Porytiles-1.x/build/test/PorytilesTestSuite
./build/Porytiles-1.x/test/Porytiles1xTestSuite
build-macos-arm64-clang-llvm:
name: Build on macos-arm64 with clang
runs-on: macos-latest
# GitHub removed Intel Mac runners, so macos-latest is now arm64
# We don't need to install zlib since it is shipped with MacOS, CMake will find it
# We don't need to install zlib since it is shipped with macOS, CMake will find it
steps:
- name: Install Clang+LLVM 16 and dependencies
run: |
Expand All @@ -90,15 +88,14 @@ jobs:
uses: actions/checkout@v3

# Use -DCMAKE_FIND_FRAMEWORK=NEVER, otherwise CMake sometimes picks up outdated
# package versions deeply buried in some ancient MacOS system framework
# package versions deeply buried in some ancient macOS system framework
- name: Build the project
run: |
cd Porytiles-1.x
export CXX=/opt/homebrew/opt/llvm@16/bin/clang++
cmake -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
cmake --build .
- name: Run test suite
run: |
./Porytiles-1.x/build/test/PorytilesTestSuite
./build/Porytiles-1.x/test/Porytiles1xTestSuite
21 changes: 9 additions & 12 deletions Scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -eu
# FIXME : build version and date not correctly passed, need to find idiomatic CMake way to handle this

package_release() {
cp Porytiles-1.x/build/cli/porytiles "$output_directory/porytiles-$mode"
cp Porytiles-1.x/build/test/PorytilesTestSuite "$output_directory/porytiles-$mode"
cp build/Porytiles-1.x/cli/porytiles "$output_directory/porytiles-$mode"
cp build/Porytiles-1.x/test/Porytiles1xTestSuite "$output_directory/porytiles-$mode"
cp CHANGELOG.md "$output_directory/porytiles-$mode"
cp README.md "$output_directory/porytiles-$mode"
cp LICENSE "$output_directory/porytiles-$mode"
Expand All @@ -17,7 +17,7 @@ package_release() {

# Run the tests, bail package script if they fail
pushd "$output_directory/porytiles-$mode"
./PorytilesTestSuite
./Porytiles1xTestSuite
popd

# Everything OK, make the zip
Expand All @@ -27,36 +27,33 @@ package_release() {
macos_arm64() {
echo "Packaging release macos-arm64..."
mkdir -p "$output_directory/porytiles-$mode"
cd Porytiles-1.x
export CXX="/opt/homebrew/opt/llvm@16/bin/clang++"
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
pushd build
cmake --build .
cd ../..
popd
package_release
}

linux_aarch64() {
echo "Packaging release linux-aarch64..."
mkdir -p "$output_directory/porytiles-$mode"
cd Porytiles-1.x
export CXX="clang++-16"
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
pushd build
cmake --build .
cd ../..
popd
package_release
}

linux_amd64() {
echo "Packaging release linux-amd64..."
mkdir -p "$output_directory/porytiles-$mode"
cd Porytiles-1.x
export CXX="clang++-16"
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_FIND_FRAMEWORK=NEVER -B build
cd build
pushd build
cmake --build .
cd ../..
popd
package_release
}

Expand Down

0 comments on commit f161e18

Please sign in to comment.