Skip to content

Commit

Permalink
Update GitHub Actions script for upload artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsut committed May 5, 2024
1 parent ca18a28 commit 52fef65
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,29 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

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

- name: Target OS
run: |
echo "OS_NAME=$(uname -s)" >> $GITHUB_ENV
echo "OS_ARCH=$(uname -m)" >> $GITHUB_ENV
- name: Build linux
if: " (matrix.os == 'ubuntu-latest')"
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libboost-dev libboost-regex-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev
./build.sh
./cfg/cfg --version
- name: Build macOS
if: " (matrix.os == 'macos-latest')"
if: matrix.os == 'macos-latest'
run: |
brew update
brew install boost
Expand All @@ -50,3 +56,17 @@ jobs:
run: |
./build.sh
./cfg/cfg --version
- name: binaly archive
run: |
tar -cvzf "cfg_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz" ./cfg/cfg
echo "ARTIFACT_CFG=cfg_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz" >> $GITHUB_ENV
ls -la
- name: upload Artifact
uses: actions/upload-artifact@v3
with:
name: cfg_${{ env.OS_NAME }}_${{ env.OS_ARCH }}
path: |
${{ env.ARTIFACT_CFG }}
retention-days: 5

0 comments on commit 52fef65

Please sign in to comment.