Update Workspace #1829
Workflow file for this run
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
# Amazon Linux.yaml | |
# | |
# This source file is part of the SDGSwift open source project. | |
# https://sdggiesbrecht.github.io/SDGSwift | |
# | |
# Copyright ©2021–2023 Jeremy David Giesbrecht and the SDGSwift project contributors. | |
# | |
# Soli Deo gloria. | |
# | |
# Licensed under the Apache Licence, Version 2.0. | |
# See http://www.apache.org/licenses/LICENSE-2.0 for licence information. | |
name: Amazon Linux | |
on: [push, pull_request] | |
jobs: | |
Amazon_Linux: | |
name: Amazon Linux | |
runs-on: ubuntu-20.04 | |
container: swift:5.8.0-amazonlinux2 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Cache Workspace | |
uses: actions/cache@v2 | |
with: | |
key: Amazon‐Linux‐${{ hashFiles('.github/workflows/**') }} | |
path: .build/SDG/Workspace | |
- name: Repair Git | |
shell: bash | |
run: | | |
set -x | |
git config --global --add safe.directory '*' | |
- name: Install SwiftPM dependencies | |
shell: bash | |
run: | | |
set -x | |
yum install --assumeyes \ | |
ncurses-devel \ | |
sqlite-devel | |
- name: Install Workspace dependencies | |
shell: bash | |
run: | | |
set -x | |
yum install --assumeyes \ | |
curl | |
- name: Install Workspace | |
shell: bash | |
run: | | |
set -x | |
if workspace version > /dev/null 2>&1 ; then | |
echo "Using system install of Workspace..." | |
workspace version •language '🇨🇦EN' •use‐version 0.44.0 | |
elif .build/SDG/Workspace/workspace version > /dev/null 2>&1 ; then | |
echo "Using repository cache of Workspace..." | |
.build/SDG/Workspace/workspace version •language '🇨🇦EN' •use‐version 0.44.0 | |
else | |
echo "No cached build detected; fetching Workspace..." | |
export OVERRIDE_INSTALLATION_DIRECTORY=.build/SDG | |
curl -sL https://gist.github.com/SDGGiesbrecht/4d76ad2f2b9c7bf9072ca1da9815d7e2/raw/update.sh | bash -s Workspace "https://github.com/SDGGiesbrecht/Workspace" 0.44.0 "" workspace | |
.build/SDG/Workspace/workspace version •language '🇨🇦EN' •use‐version 0.44.0 | |
fi | |
- name: Refresh | |
shell: bash | |
run: | | |
set -x | |
if workspace version > /dev/null 2>&1 ; then | |
echo "Using system install of Workspace..." | |
workspace refresh •language '🇨🇦EN' •use‐version 0.44.0 | |
elif .build/SDG/Workspace/workspace version > /dev/null 2>&1 ; then | |
echo "Using repository cache of Workspace..." | |
.build/SDG/Workspace/workspace refresh •language '🇨🇦EN' •use‐version 0.44.0 | |
else | |
echo "No cached build detected; fetching Workspace..." | |
export OVERRIDE_INSTALLATION_DIRECTORY=.build/SDG | |
curl -sL https://gist.github.com/SDGGiesbrecht/4d76ad2f2b9c7bf9072ca1da9815d7e2/raw/update.sh | bash -s Workspace "https://github.com/SDGGiesbrecht/Workspace" 0.44.0 "" workspace | |
.build/SDG/Workspace/workspace refresh •language '🇨🇦EN' •use‐version 0.44.0 | |
fi | |
- name: Validate | |
shell: bash | |
run: | | |
set -x | |
if workspace version > /dev/null 2>&1 ; then | |
echo "Using system install of Workspace..." | |
workspace validate •job amazon‐linux •language '🇨🇦EN' •use‐version 0.44.0 | |
elif .build/SDG/Workspace/workspace version > /dev/null 2>&1 ; then | |
echo "Using repository cache of Workspace..." | |
.build/SDG/Workspace/workspace validate •job amazon‐linux •language '🇨🇦EN' •use‐version 0.44.0 | |
else | |
echo "No cached build detected; fetching Workspace..." | |
export OVERRIDE_INSTALLATION_DIRECTORY=.build/SDG | |
curl -sL https://gist.github.com/SDGGiesbrecht/4d76ad2f2b9c7bf9072ca1da9815d7e2/raw/update.sh | bash -s Workspace "https://github.com/SDGGiesbrecht/Workspace" 0.44.0 "" workspace | |
.build/SDG/Workspace/workspace validate •job amazon‐linux •language '🇨🇦EN' •use‐version 0.44.0 | |
fi | |
- name: Grant permission to cache | |
shell: bash | |
run: | | |
set -x | |
chmod -R a+rwx . |