-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: Build and Upload Artifact | ||
name: Build and Release (on GitHub only) | ||
|
||
on: | ||
# either when a push is made to the main branch or when a pull request is merged | ||
# when a push is made to the main branch (like when a pull request is merged, or something is pushed directly) | ||
workflow_dispatch: | ||
push: | ||
branches: [ "main", "pr/adisidev/201" ] | ||
|
@@ -20,13 +20,13 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cache APT packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: /var/cache/apt | ||
key: ${{ runner.os }}-apt-${{ hashFiles('apt-dependencies.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-apt- | ||
# - name: Cache APT packages | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /var/cache/apt | ||
# key: ${{ runner.os }}-apt-${{ hashFiles('apt-dependencies.txt') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-apt- | ||
|
||
- name: Install Dependencies | ||
run: | | ||
|
@@ -35,11 +35,11 @@ jobs: | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
sudo apt update && sudo apt install -y gcc-11 g++-11 | ||
- name: Save APT cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: /var/cache/apt | ||
key: ${{ runner.os }}-apt-${{ hashFiles('apt-dependencies.txt') }} | ||
# - name: Save APT cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /var/cache/apt | ||
# key: ${{ runner.os }}-apt-${{ hashFiles('apt-dependencies.txt') }} | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
@@ -48,23 +48,18 @@ jobs: | |
run: | | ||
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install -j$(nproc) -- | ||
# - name: Test | ||
# - name: Run CTest | ||
# working-directory: ${{github.workspace}}/build | ||
# # Execute tests defined by the CMake configuration. | ||
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
# run: ctest -C ${{env.BUILD_TYPE}} | ||
|
||
- name: Build Project | ||
run: | | ||
sudo cmake -B build | ||
sudo make -j${CORES} -C build | ||
- name: Run Tests | ||
run: | | ||
sudo make install -C build | ||
cd tests/ | ||
chmod +x stress_test.sh | ||
bash stress_test.sh | ||
# - name: Run Stress Test | ||
# run: | | ||
# sudo make install -C build | ||
# cd tests/ | ||
# chmod +x stress_test.sh | ||
# bash stress_test.sh | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -105,16 +100,4 @@ jobs: | |
files: build/bin/cartogram | ||
body: "Rolling release ${{ steps.generate_tag.outputs.release_number }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy: | ||
needs: build-and-release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy binary to go-cart.io | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
username: ${{ secrets.DEPLOY_USER }} | ||
key: ${{ secrets.DEPLOY_SSH_KEY }} | ||
script: /home/cartogram/deploy-cartogram-cpp.sh | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Depoy (to go-cart.io) | ||
|
||
on: | ||
# only when triggered manually, after we have tested it ourselves | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy binary to go-cart.io | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
username: ${{ secrets.DEPLOY_USER }} | ||
key: ${{ secrets.DEPLOY_SSH_KEY }} | ||
script: /home/cartogram/deploy-cartogram-cpp.sh |